Based on the PyBay 2016 talk by Armin Ronacher. Here are the slides. Here is the talk.
Install from root directory (in a virtualenv) with:
pip install -e .
Run the application with:
export FLASK_APP=myapp._devapp
export FLASK_DEBUG=1
flask run
Interaction with the API using httpie (pip install httpie
):
http ":5000/v1.0/sum?a=1&b=2"
http :5000/v1.0/difference a:=1 b:=2
Coming soon:
- add pagination example
- add in flask-sqla
- context for improved security example
- testing