SQLAlchemy
- Category
- Frameworks and libraries
- Docs outline
- 17 sections
Official docs outline
docs.sqlalchemy.org- Engine and Connections
create_engine, database URLs, Engine as the source of connectivity, and dialects.
- Transactions and the DBAPI
Connection, commit as you go versus begin once, text() SQL, Result rows, and parameter binding.
- Table Metadata
MetaData, Table and Column, ForeignKey, create_all, declarative mapping with DeclarativeBase, Mapped and mapped_column.
- Core SQL Expression Language
select, insert, update, delete constructs, where, joins, order_by, group_by, aggregate functions, subqueries, and CTEs.
- Mapping Python Classes
Declarative mapping, mapped_column, type annotations, dataclass mappings, inheritance, and column configuration.
- Using the ORM Session
Session lifecycle, unit of work, flush and commit, identity map, object states, and sessionmaker.
- ORM Data Manipulation
Adding objects, flush, updating via unit of work, bulk INSERT/UPDATE/DELETE, and refreshing state.
- Relationship Configuration
relationship(), one-to-many, many-to-one, many-to-many, back_populates, association objects, and cascades.
- ORM Querying Guide
select() with ORM entities, joins, relationship loading strategies, selectinload, joinedload, lazy loading, and DML with ORM.
- Session Transactions and Isolation
Session begin/commit/rollback, autobegin, nested transactions with savepoints, and isolation levels.
- Connection Pooling
QueuePool, pool_size, overflow, pre-ping, recycling, and pool events.
- Datatypes and Custom Types
Column types, TypeDecorator, custom types, JSON and Enum types, and type coercion.
- Constraints, Indexes and DDL
Primary key, foreign key, unique and check constraints, indexes, naming conventions, and DDL execution.
- Database Reflection
Reflecting tables and schemas, Inspector, and automap for existing databases.
- Using AsyncIO
create_async_engine, AsyncSession, awaitable APIs, lazy loading limits, and run_sync.
- Events and Extending the ORM
ORM events, Session events, mapper events, hybrid attributes, and association proxies.
- Migrating to 2.0
2.0-style usage, differences from legacy Query API, future mode, and common error messages.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.