Copier template for fastapi projects.
- ๐ Basic fastapi setup
- ๐ API versioning using fastapi-versionizer
- ๐ฆ Pre-defined HTTP status code error models
- ๐ Sorting and filtering query dependencies
- ๐ Pagination model with built-in page calculation
- ๐ฆ Poetry setup with a pre-defined pyproject.toml
- ๐ Continuous integration (CI) pipelines for Github Actions and GitLab CI/CD
- ๐ณ Docker support with build and publish pipelines
- โ๏ธ Settings management using pydantic-settings
- ๐๏ธ Database support with sqlmodel and mysql, postgres or sqlite configuration
โถ๏ธ alembic database migrations- ๐ poethepoet task runner
- ๐ช pre-commit hooks
- ๐ pylint code linter
- ๐ mypy static type checker
- ๐งช pytest unit tests
- ๐ก๏ธ bandit code security check
- ๐จ autopep8 and pydocstringformatter code formatter and styling
- ๐ VSCode configuration
First install copier:
(from the official installation documentation)
pip install copier
Make sure the requirements are met, then:
copier copy --trust "https://github.com/worldworm/copier-fastapi.git" .
To update a template after creating a project, run:
copier update --trust -a .project/.copier-answers.fastapi.yml .
In addition to this template, there are a number of other Copier templates available. For an overview of all available templates, visit the Templates Showcase repository.