SQLAlchemy is that the Python SQL toolkit and Object Relational Mapper that provides application developers the complete power and adaptability of SQL.

It provides a full suite of documented enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into an easy and Pythonic domain language.


SQL databases behave less like object collections the more size and performance start to matter; object collections behave less like tables and rows the more abstraction starts to matter. SQLAlchemy aims to accommodate both of those principles.

SQLAlchemy considers the database to be a relational algebra engine, not just a set of tables. Rows are often selected from not only tables but also joins and other select statements; any of those units are often composed into a bigger structure. SQLAlchemy’s expression language builds on this idea from its core.

SQLAlchemy is most famous for its object-relational mapper (ORM), an optional component that gives the info mapper pattern, where classes are often mapped to the database in open ended, multiple ways – allowing the thing model and database schema to develop during a cleanly decoupled way from the start .

SQLAlchemy’s overall approach to those problems is entirely different from that of most other SQL / ORM tools, rooted during a so-called complimentarity- oriented approach; rather than hiding away SQL and object relational details behind a wall of automation, all processes are fully exposed within a series of composable, transparent tools. The library takes on the work of automating redundant tasks while the developer remains on top of things of how the database is organized and the way SQL is made .