A scaffold to speed up launching a flask project, set up with minimal dependencies.
You can just remove LICENSE
, .git/
, and .vscode/
files if you don't need them.
There is no silver bullet, so if other libraries or practice are preferred, you can add or change anything as you like.
-
Python 3.7+
-
Poetry
-
(Optional) Docker and docker compose
- APIFlask
- Blueprint templates to organize directory structure
- Colorful logger in terminals, stolen from tornado
- Gunicorn aiohttp server for production use
- Integrated with static analysis and lint tools like
mypy
,black
,flake8
and git hook toolpre-commit
- Default Github Actions and Heroku configuration
python3 -m venv venv && source venv/bin/activate && poetry install
export FLASK_ENV=development
flask run
gunicorn -b :5000 aioapp:aioapp -k aiohttp.worker.GunicornWebWorker --reload
./boot.sh
docker build .
docker-compose up --build
black . --exclude venv
pre-commit run --all-files