Skip to content

Instantly share code, notes, and snippets.

@aryou
Last active March 22, 2024 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aryou/1f0861ac855085c5887ce441d7416270 to your computer and use it in GitHub Desktop.
Save aryou/1f0861ac855085c5887ce441d7416270 to your computer and use it in GitHub Desktop.
Raeden Code Challenge

Code Challenge


  1. Build a REST API using the Flask framework to hold addresses
  2. Your API should have an endpoint to add new addresses. Sample data provided below of addresses to use a. You can use any storage engine you like. Postgres, mysql, mongodb, redis, sqllite or even store in a flat file. Just make sure you give instructions on how to setup the storage device b. the created field date/times as ISO-8601 with timezones UTC format when the address was created
  3. Create an endpoint to get all addresses stored
  4. Create an endpoint to filter all addresses where value="high"
  5. Use at least one design pattern

Requirements


  1. Should be written in python
  2. There should be a README.md in the root directory with instructions on how to run the project, install any dependencies and document the new endpoints
  3. Should be tests to add the sample data into the and run the additional endpoints
  4. It should support JSON over HTTP

Extra Credit


  1. Include Swagger documentation
  2. Dockerize your app

Submitting


Zip Up your project and email to your recruiter or email rick@raeden.com. Make sure you include any instructions on how to run your application

Address Data


[
  {
    "name":"United Center",
    "address": "1901 W Madison St",
    "city": "Chicago",
    "state": "IL",
    "postal_code": "60612",
    "value": "medium",
    "created": "{utc.datetime}"
  },
  {
    "name":"Madison Square Garden",
    "address": "4 Pennsylvania Plaza",
    "city": "New York",
    "state": "NY",
    "postal_code": "10001",
    "value": "low",
    "created": "{utc.datetime}"
  },
  {
    "name":"Staples Center",
    "address": "1111 S Figueroa St",
    "city": "Los Angeles",
    "state": "CA",
    "postal_code": "90015",
    "value": "low",
    "created": "{utc.datetime}"
  },
  {
    "name":"Phoenix Suns Arena",
    "address": "201 E Jefferson St",
    "city": "Phoenix",
    "state": "AZ",
    "postal_code": "85004",
    "value": "high",
    "created": "{utc.datetime}"
  },
  {
    "name":"Fiserv Forum",
    "address": "1111 Vel R. Phillips Ave",
    "city": "Milwaukee",
    "state": "WI",
    "postal_code": "53203",
    "value": "high",
    "created": "{utc.datetime}"
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment