Release: 1.4.46 | Release Date: January 3, 2023

# SQLAlchemy 1.4 Documentation

# 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

SQLAlchemy 1.4 / 2.0

SQLAlchemy 2.0 is functionally available as part of SQLAlchemy 1.4, and integrates Core and ORM working styles more closely than ever. The new tutorial introduces both concepts in parallel.

- For a quick glance: ORM Quick Start - a glimpse at what working with the ORM looks like

- For all users: SQLAlchemy 1.4 / 2.0 Tutorial - The new SQLAlchemy 1.4/2.0 Tutorial

Legacy SQLAlchemy 1.x Tutorials

The 1.x Object Relational Tutorial and Core Tutorial are the legacy tutorials that should be consulted for existing SQLAlchemy codebases.

- Object Relational Tutorial (1.x API)

- SQL Expression Language Tutorial (1.x API)

Migration Notes

- Migration from 1.3 - Migration notes for SQLAlchemy Version 1.4

- SQLAlchemy 2.0 Preview - Background on preparing a SQLAlchemy 1.4 application for SQLAlchemy 2.0

- Changelog catalog - Detailed changelogs for all SQLAlchemy Versions

Reference Documentation

SQLAlchemy ORM

- ORM Configuration: Mapped Class 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

More Dialects …

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

- Complete table of of contents

- Index