Personal template for FastApi & Aiogram3
Include admin panel using sqladmin
Feel free to use :)
Requirements:
- python = "^3.12"
- aiogram = "^3.3.0"
- fastapi = "^0.109.0"
- uvicorn = "^0.27.0.post1"
- environs = "^10.3.0"
- sqlalchemy = "^2.0.28"
- alembic = "^1.13.1"
- asyncpg = "^0.29.0"
- sqladmin = "^0.20.1"
-
Import module with models to
migrations/base.py
. -
Execute a command to make migration file
alembic revision --autogenerate -m 'Model name or migration title'
-
Check the created migration file. WARNING!!! Alembic can't do model renaming automatically.
-
Make migration (make changes in db)
alembic upgrade head