SQLAlchemy Documentation — SQLAlchemy 2.0.0b1 documentation
SQLAlchemy Documentation
Getting Started
A high level view and getting set up.
Overview | Installation Guide | Frequently Asked Questions | Migration from 1.4 | Glossary | Error Messages | Changelog catalog
Tutorials
SQLAlchemy 2.0
The SQLAlchemy 2.0 series represents a major rework of the classic 1.x SQLAlchemy APIs that have evolved over more than 15 years. The SQLAlchemy tutorial provides a holistic view of the library, integrating Core and ORM features in a narrative style that is optimized towards establihsing a solid understanding of the foundations upon which SQLAlchemy is built on. The tutorials are recommended for all new users as well as veterans of older SQLAlchemy versions alike.
- SQLAlchemy 2.0 Tutorial - SQLAlchemy 2.0’s main tutorial
- Migrating to SQLAlchemy 2.0 - Complete background on migrating from 1.3 or 1.4 to 2.0
Reference Documentation
SQLAlchemy ORM
- ORM Configuration: Mapper Configuration | Relationship Configuration
- ORM Usage: Session Usage and Guidelines | Querying Data, Loading Objects | AsyncIO Support
- Configuration Extensions: Mypy integration | Association Proxy | Hybrid Attributes | Automap | Mutable Scalars | All extensions
- Extending the ORM: ORM Events and Internals
- Other: Introduction to Examples
SQLAlchemy Core
- Engines, Connections, Pools: Engine Configuration | Connections, Transactions, Results | AsyncIO Support | Connection Pooling
- Schema Definition: Overview | Tables and Columns | Database Introspection (Reflection) | Insert/Update Defaults | Constraints and Indexes | Using Data Definition Language (DDL)
- SQL Reference: SQL Expression API docs
- Datatypes: Overview | Building Custom Types | API
- Core Basics: Overview | Runtime Inspection API | Event System | Core Event Interfaces | Creating Custom SQL Constructs
Dialect Documentation
The dialect is the system SQLAlchemy uses to communicate with various types of DBAPIs and databases. This section describes notes, options, and usage patterns regarding individual dialects.
PostgreSQL | MySQL | SQLite | Oracle | Microsoft SQL Server