In order to create a template to FastAPI projects. 🚀
Cookiecutter is a CLI tool (Command Line Interface) to create an application boilerplate from a template. It uses a templating system — Jinja2 — to replace or customize folder and file names, as well as file content.
pip install cookiecutter
cookiecutter gh:arthurhenrique/cookiecutter-fastapi
- Python3.8.1
- Pip
- Poetry (Python Package Manager)
make install
make run
make deploy
make test
make easter
Files related to application are in the app
or tests
directories.
Application parts are:
app
├── api - web related stuff.
│ └── routes - web routes.
├── core - application configuration, startup events, logging.
├── models - pydantic models for this application.
├── services - logic that is not just crud related.
└── main.py - FastAPI application creation and configuration.
├──
tests - pytest