https://github.com/kigawas/flask-scaffold
A scaffold to speed up launching a flask project.
https://github.com/kigawas/flask-scaffold
circleci docker flask flask-scaffold git-hooks python3 scaffold starter-kit
Last synced: 10 months ago
JSON representation
A scaffold to speed up launching a flask project.
- Host: GitHub
- URL: https://github.com/kigawas/flask-scaffold
- Owner: kigawas
- License: mit
- Created: 2018-10-24T06:33:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-20T07:08:30.000Z (about 1 year ago)
- Last Synced: 2025-05-20T08:23:29.814Z (about 1 year ago)
- Topics: circleci, docker, flask, flask-scaffold, git-hooks, python3, scaffold, starter-kit
- Language: Python
- Homepage:
- Size: 650 KB
- Stars: 15
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flask-scaffold
[](https://app.codacy.com/app/kigawas/flask-scaffold)
[](https://github.com/kigawas/flask-scaffold/actions)
[](https://hub.docker.com/r/kigawas/flask-scaffold/)
[](https://github.com/kigawas/flask-scaffold)
A scaffold to speed up launching a flask project, set up with [minimal dependencies](https://github.com/kigawas/flask-scaffold/blob/master/pyproject.toml).
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.
## Prerequisites
- Python 3.10+
- Poetry
- (Optional) Docker and docker compose
## Main features
- [APIFlask](https://apiflask.com/)
- Blueprint templates to organize directory structure
- Colorful logger in terminals, stolen from [tornado](https://github.com/tornadoweb/tornado/blob/master/tornado/log.py)
- Gunicorn uvicorn server for production use
- Integrated with static analysis and lint tools like `mypy` and `ruff`
- Default [Github Actions](https://github.com/kigawas/flask-scaffold/actions) and [Heroku](https://scaffold-flask.herokuapp.com/) configuration
## Common tasks
### Create virtual environment with dependencies
python3 -m venv .venv && source .venv/bin/activate && poetry install
### Run development flask server
flask run --debug
### Run development uvicorn server
uvicorn asgi:app --port 5000 --reload
### Run development gunicorn server
gunicorn -b :5000 asgi:app -k uvicorn.workers.UvicornWorker --reload
### Run production gunicorn server
./boot.sh
### Build docker image
docker build .
### Run with docker compose
docker-compose up --build