python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
python3 src/main.py (or, uvicorn src.main:app --host=0.0.0.0)
pip3 freeze > requirements.txt
-
Create (or update) the
XXXTable
class insrc/db/*
. -
(When creating a new table) Add the corresponding Table class to
__all__
insrc/db/__init__.py
. -
Automatically generate migration files
alembic revision --autogenerate -m "message"
- Run migration
alembic upgrade heads
- Rollback
alembic downgrade -1
-
local: http://localhost:8000/docs
-
Docker: http://localhost:80/docs