Sqlalchemy

The standard Python SQL toolkit and ORM — 2.x style only. Covers declarative models with DeclarativeBase/Mapped/mapped_column, engine and session lifecycle, CRUD with select() and Session.scalars(), relationships and eager loading (selectinload vs joinedload), transactions, async engines, and Alembic migrations. Use when defining database models in Python, querying relational databases (PostgreSQL, SQLite, MySQL) from application code, wiring a database into FastAPI, fixing N+1 or DetachedInstanceError problems, or migrating legacy Query-API code to 2.x.

stanfish06 Updated

File contents

stanfish06/skillquarium/tree/main/skills/sqlalchemy commit 3530219fd6

Frequently asked questions

npx skillmds@latest add stanfish06/sqlalchemy