r/FastAPI • u/eslam5464 • Nov 10 '25
Other FastAPI Template
I’m excited to share my new open-source project: Fastapi-Template
It’s designed to give you a solid starting point for building backend APIs with FastAPI while incorporating best practices so you can focus on business logic instead of infrastructure. You can check the docs folder for a walkthrough of the architecture and code.
Highlights
Token authentication using JWT with secure password hashing
Async SQLAlchemy v2 integration with PostgreSQL
Database migrations using Alembic
Organized folder structure with clear separation for routes, schemas, services, and repositories
Structured logging with Loguru
Ready-to-use .env configuration and environment management
Pre-commit hooks and code formatting
Example cloud storage integration using Backblaze B2
Note:
Feel free to edit it to match your tone, add any screenshots or code snippets you want, and adjust the bullet points to emphasise what you care about most.
If you think something is missing, needs refactoring, or could be better structured, I’d love to hear your thoughts in a comment below or open a PR on Github.
2
u/Revolutionary_Lie898 Nov 29 '25
Nice work! I love your template, and I have some questions for you: can it be that the order in which you run the pre-commit hooks matters? For example, shouldn’t autoflake run first, then isort, and then black? Also, I noticed that you didn’t exclude (__init__.py$|migrations/) in black, is there any reason for that?