git clone https://github.com/SaD-Pr0gEr/fastapi_template.git
- Go to
pyproject.toml
and set project name
to your project name
poetry install
poetry shell
Setting up environment vars
- Rename
app/example.envs
to .envs
- Remove
example
from every file name in app/example.envs
(They should look like this app/.envs/.env
etc.)
- Rename all example values to actual values and put other values(add these values to config class)
- Rename
app/example.config.toml
to app/config.toml
- Rename all example values to actual values
- App models put in app model file, and import this file to alembic's
env.py
file(before BASE)
- All models must inherit from BASE class in
apps/models.py
and BaseModelMixin(OPTIONAL)
- Apply migrates with command
alembic upgrade head
python manage.py test-connection
python manage.py site run
- Install pre-commit first time with command
pre-commit install
- Run pre-commit hooks with command
pre-commit run --all-files