Simple python web app built with flask
Export app name first
$ export FLASK_APP=app.py
python app.py
That's to this code in app.py
if __name__ == '__main__':
app.run(debug=False,host='0.0.0.0')
To create a python virtual environment
$ sudo pip install virtualenv
If pip is missing on OSX you get this easy_install
$ easy_install pip
$ brew install python3
$ virtualenv venv
$ source venv/bin/activate
$ pip install [package]
$ pip3 install -r requirements.txt
$ curl .:5000/ping
$ curl .:5000/dataSources
$ curl .:5000/dataSource/[guid]
$ curl -X 'DELETE' .:5000/dataSource/[guid]
$ curl -X 'PUT' .:5000/dataSource -d '{"name":"new", "url":"http://google.com"}' -H 'content-type: application/json'
curl ".:5000/raleigh/crime?query=Drug"
curl .:5000/allData
- switch to quart https://gitlab.com/pgjones/quart
- migration to quart
- todo: switch to async await ? https://github.com/xzased/pytest-async-mongodb