Maze python-code

Example application code for the Senior Developer - homework.

Deployed on Heroku at https://mazeapi.herokuapp.com. Visit API documentation to see available endpoints.

Installation

Install dependencies:

pip install -r requirements.txt

Usage

Start server

make up

Create Maze

curl --request POST 'localhost:5005/v1/mazes' --header 'Content-Type: application/json' --data-raw '[3, 1, [2, [5,[4, 3]]], [], [2]]'
{
  "content": [
    3, 
    1, 
    [
      2, 
      [
        5, 
        [
          4, 
          3
        ]
      ]
    ], 
    [], 
    [
      2
    ]
  ], 
  "id": 244273
}

Search Values in Maze

curl --request GET 'localhost:5005/v1/mazes/244273/values?value=2&operator=greater_than_or_equal'                                    
[
  3, 
  2, 
  5, 
  4, 
  3, 
  2
]