This is a template for a simple flask api using flask-restful and MongoDB.
Prereqs:
- Python 2.7+
- Virtual Env
- Mongo
- Pymongo
To get started in Terminal:
git clone https://github.com/jhschwartz/flask-api-template.git
cd flask-api-template
virtualenv flask
source flask/bin/activate
pip install -r requirements.txt
chmod a+x run.py
./run.py
- Make api calls (ex:
curl http://localhost:5000/api/v1.0/todos
or use Postman [reccomended]) - Make your own api, in
app/api/api.py
or by creating api files inapp/api
(remember to import new files inapp/api/__init__.py
)