A Flask and SQLAlchemy project bootstrap.
Because handling project plumbing is cumbersome and always the same.
With this project you can start with sane defaults.
I was planning on to make a cookiecutter, but there is nothing to template here.
- Clone the master branch
- Branch out to your own branch
- Start coding
You need at least git and build-essential
$ git clone https://github.com/lee-pai-long/kyo
$ make init
- Run flask dev server
$ make run
The server is then reachable at http://APPNAME.loc:5000
- Use the flask shell
$ make shell
The shell is a ipython REPL
$ make todo
Shows code tags(TODO, FIXME, CHANGED, XXX, REVIEW, BUG, REFACTOR, IDEA, WARNING) in all project.
$ make lint
$ make test
$ make safe
$ make db
The shell is provided by litecli
$ make smell
$ make help
$ pyenv activate $VIRTUALENV
$VIRTUALENV is added to the user environment by direnv as '{project_name}-{branch}'
With the virtualenv activated
$ alembic revision -m "<name of the revision>"
$ alembic upgrade head
or
$ alembic upgrade +1
$ alembic upgrade base
or
$ alembic downgrade -1
For more usage of Alembic run:
$ alembic --help
Also if you are not familiar with Alembic check the tutorial