A dockless mobility data API built with Python/Sanic
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Filter features by mode Oct 31, 2018
scripts don’t run in detached mode Nov 13, 2018
.gitignore Initial commit Oct 16, 2018
Dockerfile updates Docker workflow with serve-local script Nov 13, 2018
README.md Prioritizes Docker setup Nov 13, 2018
nginx.app Initial commit Oct 16, 2018
nginx.conf
requirements.txt use rtree to find intersections Oct 30, 2018

README.md

dockless-api

A dockless mobility data API built with Python/Sanic

Installation

About the "Database"

The source database for the API is a modified geojson file. TODO: add sample data and link to processing tools to generate source data.

Option 1: Run w/ Docker (Suggested)

  1. Install docker and start the engine: systemctl start docker

  2. Clone repo and cd into it. git clone https://github.com/cityofaustin/dockless-api.git

  3. Copy grid.json source data to ../dockless-api/app/data

  4. Start the docker server (in the background on port 80)

./scripts/serve-local.sh

  1. Make a request:
curl http://localhost:80/v1/trips?xy=-97.75094341278084,30.276185988411257&flow=destination

Option 2: Run w/ Python 3

  1. Clone repo and cd into it.

  2. Install python requirements:

pip install -r requirements.txt
  1. Install libspatialindex

  2. Copy grid.json source data to ../dockless-api/app/data

  3. Start the server:

python app/app.py
  1. Make a request:
curl http://localhost:8000/v1/trips?xy=-97.75094341278084,30.276185988411257&flow=destination