β
Production ready with one docker-compose command.
β
Similar to Django Code Structure.
β
Local dockerized db.
β
Dockerized PgAdmin to check the db records.
β
Migrations, Serializers and ORM configured.
β
CRUD APIs (Sneaker App).
β
Token Authentication.
β
Logging Mechanism.
β
Testcases TDD with Pytest.
β
Seperate Database(Sqlite) and mock session configured for test cases.
β
Poetry dependency management and packaging made easy. (Better than pip)
- Alembic: For Database Migrations.
- SQLAlchemy: For ORM.
- Pydantic: For Typing or Serialization.
- Pytests: For TDD or Unit Testing.
- Poetry: Python dependency management and packaging made easy. (Better than pip)
- Docker & docker-compose : For Virtualization.
- postgresSQL: Database.
- PgAdmin: To interact with the Postgres database sessions.
- Loguru: Easiest logging ever done.
Make sure you have docker and docker-compose installed docker installation guide
create .env file in root folder fastapi-boilerplate/.env
DATABASE_URL=postgresql+psycopg://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
docker-compose up
- Swagger docs on
localhost:8000/docs
- GET request example
- PgAdmin on
localhost:5050