About
Cookiecutter FastAPI project
Cookiecutter template for a FastAPI app.
GitHub repo: https://github.com/DanielLenz/cookiecutter-fastapi-project
Documentation: https://cookiecutter-fastapi-project.readthedocs.io
Free software: BSD-3 license
Quickstart
Install the latest version of Cookiecutter
Generate the FastAPI sample project:
cookiecutter https://github.com/DanielLenz/cookiecutter-fastapi-project.git
Optionally, install Task to run the build tasks.
Follow the tasks in Taskfile.yml to run the FastAPI app
Features
Taskfile as a modern alternative to Makefile to perform e.g. the common build tasks
Test suite, including mocking DB connections following best practices
A simple Dockerfile to run the FastAPI app in a container
Various examples for middleware, including HTTPS redirection, CORS, and rate limiting
Proper project setup following the official FastAPI documentation
Coming soon
Some of the features that I’d like to add in the near future are
GitHub Actions for basic CI/CD setup
Proper logging setup
Examples for websocket connections
A basic security setup