Ready to kickstart your FastAPI project? Look no further! This boilerplate offers you a robust foundation for building powerful applications.
✅ Docker Compose for seamless production setup.
✅ Local Dockerized database for convenient development.
✅ PgAdmin Docker container for easy database inspection.
✅ Migrations, Serializers, and ORM configurations ready to roll.
✅ Token Authentication for secure endpoints.
✅ Logging Mechanism for effective debugging.
✅ Pytest for Test-Driven Development (TDD).
✅ Separate SQLite database and mock sessions for testing.
✅ Poetry for hassle-free dependency management and packaging.
- Alembic: Simplifying database migrations.
- SQLAlchemy: Trustworthy ORM capabilities.
- Pydantic: Handling typing and serialization with ease.
- Pytest: Empowering Test-Driven Development (TDD).
- Poetry: The smarter choice for dependency management.
- Docker & docker-compose: Virtualization for efficient development.
- PostgreSQL: A robust relational database system.
- PgAdmin: Your ally for efficient database management.
- Loguru: The simplest logging solution.
-
Create a
.env
file in the root folder (fastapi-boilerplate/.env
):DATABASE_URL=postgresql+psycopg2://postgres:password@db:5432/boiler_plate_db DB_USER=postgres DB_PASSWORD=password DB_NAME=boiler_plate_db PGADMIN_EMAIL=admin@admin.com PGADMIN_PASSWORD=admin X_TOKEN=12345678910
-
Launch Docker Compose:
docker-compose up
- Discover Swagger docs at
localhost:8000/docs
. - Dive into PgAdmin at
localhost:5050
.
Feel free to tailor and tweak this boilerplate to suit your FastAPI project needs!
A big shoutout to the original rawheel/fastapi-boilerplate for providing the initial inspiration. The foundation laid by the original repository has been instrumental in shaping this customized boilerplate.