This is a template for FastAPI CRUD operations.
- FastAPI
- Repository Pattern (from pyrepositories)
- Automatic docker image build and publish on release
You will have to set up 2 secrets and 2 variables in your repository
Secrets:
DOCKER_PUSH
: A github classic token with packagesread
andwrite
permissionsHUB_PASSWORD
: Docker Hub token.
Variables:
HUB_NS
: Docker hub target NameSpaceHUB_REPO
: Docker hub target repository
- Python 3.8+
pip install -r requirements.txt --upgrade
You will find a lib.py
in the app
directory. This is where you will define helper functions for your CRUD operations.
There is also a models.py
in the app
directory. This is where you will define your Pydantic models.
- Possibility to decide easily between
ghcr.io
and docker hub targers