SQLAlchemy Documentation¶
Getting Started
New to SQLAlchemy? Start here:
For Python Beginners: Installation Guide - basic guidance on installing with pip and similar
For Python Veterans: SQLAlchemy Overview - brief architectural overview
Tutorials
New users of SQLAlchemy, as well as veterans of older SQLAlchemy release series, should start with the SQLAlchemy Unified Tutorial, which covers everything an Alchemist needs to know when using the ORM or just Core.
For a quick glance: ORM Quick Start - a glimpse at what working with the ORM looks like
For all users: SQLAlchemy Unified Tutorial - In depth tutorial for Core and ORM
Migration Notes
Users coming from older versions of SQLAlchemy, especially those transitioning from the 1.x style of working, will want to review this documentation.
Migrating to SQLAlchemy 2.0 - Complete background on migrating from 1.3 or 1.4 to 2.0
What’s New in SQLAlchemy 2.0? - New 2.0 features and behaviors beyond the 1.x migration
Changelog catalog - Detailed changelogs for all SQLAlchemy Versions
Reference and How To
SQLAlchemy ORM - Detailed guides and API reference for using the ORM
Mapping Classes: Mapping Python Classes | Relationship Configuration
Using the ORM: Using the ORM Session | ORM Querying Guide | Using AsyncIO
Configuration Extensions: Association Proxy | Hybrid Attributes | Mutable Scalars | Automap | All extensions
Extending the ORM: ORM Events and Internals
Other: Introduction to Examples
SQLAlchemy Core - Detailed guides and API reference for working with 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 Statements: SQL Expression Elements | Operator Reference | SELECT and related constructs | INSERT, UPDATE, DELETE | SQL Functions | Table of Contents
Datatypes: Overview | Building Custom Types | Type API Reference
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
Supplementary
Frequently Asked Questions - A collection of common problems and solutions
Glossary - Terms used in SQLAlchemy’s documentation
Error Message Guide - Explainations of many SQLAlchemy Errors