{"repo":"rafsaf/minimal-fastapi-postgres-template","free":true,"listed":false,"github":"https://github.com/rafsaf/minimal-fastapi-postgres-template","clone":"git clone https://github.com/rafsaf/minimal-fastapi-postgres-template.git","description":"minimal-fastapi-postgres-template based on official template but rewritten","language":"Python","stars":572,"topics":["asyncio","fastapi","postgresql","python","sqlalchemy","fastapi-template","template","boilerplate","fastapi-boilerplate","postgres"],"license":"MIT","category":"databases-storage","readme_excerpt":"Minimal FastAPI PostgreSQL template Check out online example: https://minimal-fastapi-postgres-template.rafsaf.pl, it's 100% code used in template (docker image) with added my domain and https only. - Minimal FastAPI PostgreSQL template - About - Features - Quickstart - 1. Create repository from a template - 2. Install dependencies with uv - 3. Run app - 4. Activate pre-commit - 5. Running tests - Step by step example - POST and GET endpoints - 1. Create new app - 2. Create SQLAlchemy model - 3. Import new models.py file in alembic env.py - 4. Create and apply alembic migration - 5. Create request and response schemas - 6. Create endpoints - 7. Add Pet model to tests factories - 8. Create new test file - 9. Write tests - Design choices - Dockerfile - Registration - Delete user endpoint - JWT and refresh tokens - Writing scripts / cron - Docs URL - CORS - Allowed Hosts - License About If you are curious about latest changes and rationale, read 2026 update blog post: Update of minimal-fastapi-postgres-template to version 7.0.0. Enjoy! Features - [x] Template repository. - [x] SQLAlchemy 2.0, async queries, best possible autocompletion support. - [x] PostgreSQL 18 database under asyncpg interface. - [x] Full Alembic migrations setup (also in unit tests). - [x] Secure and tested setup for PyJWT and bcrypt. - [x] Ready to go Dockerfile with uvicorn webserver. - [x] uv, mypy, pre-commit hooks with ruff. - [x] Perfect pytest asynchronous test setup and full coverage. Quickstart 1. C","default_branch":null,"files":null,"tree":[],"storefront":"/r/rafsaf","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rafsaf/minimal-fastapi-postgres-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}