finds.dev← search

// the find

grillazz/fastapi-sqlalchemy-asyncpg

★ 523 · Python · MIT · updated Jun 2026

Integration of FastAPI framework supported by Pydantic with SQLAlchemy ORM and PostgreSQL on asyncpg driver

A demo/template project wiring FastAPI, SQLAlchemy 2.0 async, and asyncpg together against PostgreSQL. It's not a library you install — it's a reference implementation you clone and gut, showing how the async stack fits together with auth, scheduling, structured logging, and email in one place.

Uses SQLAlchemy 2.0's native async API (not the legacy shim), which is the right call and still trips up a lot of people. Ships with Granian as an alternative to uvicorn — worth knowing about if you care about raw throughput. The per-test transaction rollback pattern in conftest.py is solid test isolation without needing a test DB teardown strategy. Actively maintained: bumped to Python 3.14 in May 2026, dependencies are current.

It's a kitchen-sink demo, not a focused reference — JWT auth, APScheduler, Polars/Excel import, LLM streaming, nginx HA, profiling middleware all crammed into one repo makes it hard to extract any single pattern cleanly. The Shakespeare dataset as seed data is clever but means the domain models are completely disconnected from anything you'd actually build. The LLM integration just proxies to a local Ollama instance with no retry, no error handling, and no abstraction — one broken connection kills the endpoint. No Alembic autogenerate setup documented, so new developers will either hand-write migrations or guess.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →