This repository contains a high-performance, premium-quality template for developing modern APIs with Python and FastAPI.
This project is designed to be used as a scaffold for new microservices, ensuring that all new projects are born with the same standards of quality, observability, and security.
Unlike other basic templates, this one was built focusing on:
- Clean Architecture & DDD: Clear separation of concerns (Controllers, Services, Repositories).
- Native Observability: Structured logging with Trace ID and integrated Prometheus metrics.
- Robustness: Global exception handling and rigorous validation with Pydantic v2.
- Developer Experience (DX): Extensive automatic documentation and utility scripts.
- Production Ready: Pre-configured Docker, Alembic, and CI/CD.
This is a Backstage compatible template. If you are using your company's software catalog:
- Go to Create in Backstage.
- Select the FastAPI Premium Template.
- Fill in the details for your new service.
If you prefer to clone manually:
git clone git@github.com:MateusjsSilva/fast-api-template.git
cd fast-api-template/content
# Follow the instructions in the internal README.md within the content folderThe template's master code resides in the content/ folder. When the template is instantiated, values will be replaced (e.g., ${{ values.name }}) to automatically configure your project.
Note: For technical details on the implementation, see the content/docs/ folder or the internal README.