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.