OSS TanbouSign in with GitHub

combine SQL expressions and ORM mapping in one Python data-access toolkit

OSS scale score 286.7OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
12,201
Primary language
Python
License
MIT
Repository last updated
Oct 6, 2026
On this page

Overview

SQLAlchemy is a Python SQL toolkit and ORM. Its Core covers SQL expressions, connections, transactions, connection pooling, and schema metadata, while the ORM adds identity-map, unit-of-work, and data-mapper patterns on the same foundation.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Use Core for explicit SQL expressions, connections, transactions, and schema metadata

The Engine is the central connection source, while Core provides the SQL Expression Language, schema metadata, connection pooling, type handling, and DBAPI integration. Applications can use these capabilities without adopting the ORM.

Sources: [2][4]

Use the ORM with identity-map, unit-of-work, and relationship loading patterns

The ORM combines declarative mapping with identity-map, unit-of-work, data-mapper, and relationship-loading patterns while preserving explicit relational composition for joins, subqueries, and related SQL constructs.

Sources: [2]

Best fit

Fits Python backends that need both ORM productivity and direct SQL control

It works well from CRUD-heavy applications to services with complex relational queries when one project needs to move between ORM and Core while choosing database-specific drivers and explicit transaction boundaries.

Sources: [2][3]

Before adoption

SQLAlchemy 2.1.3 requires Python 3.11+; choose drivers and transaction boundaries separately

SQLAlchemy 2.1.3 requires Python 3.11 or newer, while PostgreSQL, MySQL, Oracle, and other drivers are optional dependencies selected by the application. Connections do not commit automatically, so transaction boundaries remain explicit. Version 2.1.3 also fixes ORM and SQL compiler regressions, making mapping order and generated SQL useful upgrade regression checks.

Sources: [3][5][6]

Official sources

  1. [1]sqlalchemy/sqlalchemy — GitHub repository(2026-10-06)
  2. [2]SQLAlchemy 2.1.3 — README(2026-10-06)
  3. [3]SQLAlchemy 2.1.3 — pyproject.toml(2026-10-06)
  4. [4]SQLAlchemy 2.1 tutorial — Engine(2026-10-06)
  5. [5]SQLAlchemy 2.1 tutorial — Transactions(2026-10-06)
  6. [6]SQLAlchemy 2.1.3 release(2026-10-06)
  7. [7]SQLAlchemy MIT license(2026-10-06)
Supplemental curator note

A major strength is that Core remains useful independently of the ORM, so applications can move down to explicit SQL control without replacing the data-access foundation. Standardize database drivers, transaction boundaries, and Session lifecycle across the application.

Try it in 3 steps

  1. 1

    Install SQLAlchemy 2.1.3

    Pin the reviewed stable release. SQLAlchemy 2.1.3 requires Python 3.11 or newer.

    python -m pip install "SQLAlchemy==2.1.3"
  2. 2

    Create an in-memory SQLite script

    Use the same in-memory SQLite Engine pattern as the official tutorial so no external database is required.

    cat > demo_sqlalchemy.py <<'PY' from sqlalchemy import create_engine, text engine = create_engine('sqlite+pysqlite:///:memory:') with engine.connect() as conn: value = conn.execute(text("select 'hello world'")).scalar_one() print(value) PY
  3. 3

    Run the query and inspect the result

    A hello world result verifies the minimal Engine, Connection, and text() Core path.

    python demo_sqlalchemy.py
Check the official README

Growth

Growth trends · Last 30 days

12,201 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • python
  • sql
  • sqlalchemy
Stars
12,201
Forks
1,805
Watchers
112
Open issues
214
Contributors
404
Owner type
Organization
Primary language
Python
License
MIT
Repository last updated
Oct 6, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?