Overholt 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 git@github.com:mattupstate/overholt.git
$ cd overholt
$ mkvirtualenv overholt
$ pip install -r requirements.txt
$ berks install
$ vagrant plugin install vagrant-berkshelf
$ vagrant up
$ alembic upgrade head
$ python wsgi.py
$ celery -A overholt.tasks worker
9. Open http://localhost:5000
If all went well in the setup above you will be ready to start hacking away on the application.
This application uses Alembic for database
migrations and schema management. Changes or additions to the application data
models will require the database be updated with the new tables and fields.
Additionally, ensure that any new models are imported into the consolidated
models file at overholt.models
. To generate a migration file based on the
current set of models run the following command:
$ alembic revision --autogenerate -m "<a description of what was modified>"
Review the resulting version file located in the alembic/versions
folder. If
the file is to your liking upgrade the database with the following command:
$ alembic upgrade head
For anything beyond this workflow please read the Alembic documentation.
Management commands can be listed with the following command:
$ python manage.py
These can sometimes be useful to manipulate data while debugging in the browser.
To run the tests use the following command:
$ nosetests