FastAPI-Skeleton is a web application template of FastAPI with best practice.
- Python 3.10 or later, tested on the latest CPython version.
- Redis.
- MySQL 8.0 or later.
$ redis-server &
$ sudo systemctl start mysql # or "brew services run mysql" in macOS
$ mysql -u root -e "CREATE DATABASE IF NOT EXISTS test"
$ mysql -u root test < db/db.sql
$ pip install -r requirements.txt
$ python create_admin.py admin # or change "admin" to your password
$ uvicorn app.main:app
$ mysql -u root test < db/test.sql
$ pip install -r requirements-test.txt
$ pytest --ruff app --cov=app tests
$ coverage html
$ docker compose build
$ docker compose up -d