# SQLAlchemy

> The Python SQL toolkit and Object Relational Mapper

Source: https://talira.ai/catalog/sqlalchemy-wd7fb2fw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / databases / orm](https://talira.ai/categories/libraries/databases/orm), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^1][^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]

SQLAlchemy is the SQL toolkit and object relational mapper for [Python](https://talira.ai/catalog/python-tgjs08pq.md) that gives application developers the full power and flexibility of SQL. It has two parts: the Core, a SQL abstraction layer with a SQL Expression Language for writing queries as Python expressions, a schema system that emits DDL and introspects existing databases, and a type system; and the optional ORM built on it, with a unit of work that batches writes in transactions, identity mapping and eager loading of related objects. It never generates schemas or relies on naming conventions, lets you swap in hand-written SQL, and includes dialects for PostgreSQL, MySQL and MariaDB, SQLite, Oracle and Microsoft SQL Server with sync and asyncio drivers, while other databases have external dialects.

## Links

- Website: https://www.sqlalchemy.org/
- GitHub: https://github.com/sqlalchemy/sqlalchemy
- Docs: https://docs.sqlalchemy.org/

## Problems it solves

- map Python classes to database tables and query them without writing raw SQL everywhere
- write database queries in Python that work on PostgreSQL, MySQL and SQLite
- build complex SQL queries programmatically in Python with joins and subqueries
- an ORM for Python that still lets me drop down to hand-written SQL
- use async database access in a Python web app
- load related objects efficiently to avoid N+1 queries in Python
- introspect an existing database schema from Python
- a database layer for Flask or FastAPI apps that is not tied to Django

## Features

- Core SQL Expression Language
- optional ORM with unit of work and identity map
- schema DDL generation and introspection
- dialects for PostgreSQL, MySQL/MariaDB, SQLite, Oracle and SQL Server
- sync and asyncio drivers
- eager and lazy loading strategies
- hand-written SQL can replace generated statements
- bind parameters for all literal values

## Trust

Overall: 0.15 out of 1.
Signals: backing 0.00, extensibility 0.00.

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [SQLModel](https://talira.ai/catalog/sqlmodel-z71rpfhw.md): SQL databases in Python, designed for simplicity, compatibility, and robustness
- [sqlc](https://talira.ai/catalog/sqlc-7w8h0kzr.md): Compile SQL to type-safe code

## Sources

[^1]: https://www.sqlalchemy.org/ (checked 24 Nov 2026)
[^2]: https://github.com/sqlalchemy/sqlalchemy/blob/main/LICENSE (checked 24 Nov 2026)
