Simple demo using:
- FastAPI
- SQLModel
- SqlAlchemy
- Psycopg
To demonstarte concurrency/pooling/performance.
It requires to have a local postgres instance, you can spin up one with docker like so:
docker run -it --rm -p 5433:5432 --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword postgresThrough uv, just run:
uv sync
source .venv/bin/activateNext, do the alembic migration
alembic upgrade head
Then run uvicorn
uvicorn main_asyncpg:app --host 0.0.0.0 --port 8001 --reloadI added a notebook, testendpoints.ipynb with a little example, expand it as you see fit.