Challenger Webservice is an example Flask application illustrating some of my common practices
At the bare minimum you'll need the following for your development environment:
It is strongly recommended to also install and use the following tools:
The following assumes you have all of the recommended tools listed above installed.
$ git clone [email protected]:eder/challenge-webservice.git
$ cd challenger-webservice
$ sudo pip install virtualenv
$ virtualenv challenge
$ source ./challenge/bin/activate
$ pip install -r requirements.txt
config/database.py
$ DATABASE_CONF_URI
$ DATABASE_ENG
$ cd app/config/
$ python migration.py db init
$ python migration.py db migrate
$ python migration.py db upgrade
$ python run.py
Create user:
$ curl -X POST -F facebookId=30 http://localhost:5000/person/
Delete user:
$ curl -X DELETE http://localhost:5000/person/30/
List users with limit:
$ curl http://localhost:5000/?limit=xxx
To run the tests use the following command:
$ nosetests