What problem does it solve?
Set up and manage PostgreSQL databases for FastAPI projects with a Docker-based local development workflow (single-command, no docker-compose) and production-ready configurations using environment variables. It follows a no-migrations philosophy, dropping and recreating the schema on changes, and provides guidance for setup_postgres.sh scripts, environment files that must be sourced manually, pydantic-settings configuration, SQLModel connections, lifespan handlers, session management, and Pytest-based tests using in-memory SQLite.
Core Features & Use Cases
- Docker-based local PostgreSQL setup with setup_postgres.sh
- Environment-based production configuration (must source deployment/*.env)
- No migrations policy with drop-and-recreate on schema changes
- SQLModel integration, lifespan management, and session handling
- Pytest with in-memory SQLite for fast tests
- Use Case: Configure a FastAPI app to connect to PostgreSQL, handle migrations via drop/recreate, and test endpoints locally.
Quick Start
Source deployment/demo.env to load local Postgres credentials and start the FastAPI app to create tables on startup.