# sqlalchemy/sqlalchemy

The Database Toolkit for Python

Repository: https://github.com/sqlalchemy/sqlalchemy
Canonical: https://ross.abutalabs.com/products/sqlalchemy
Homepage: https://www.sqlalchemy.org
Language: Python
License: MIT
License Family: permissive
Topics: sqlalchemy, sql, python
Last push: 2026-08-26T16:47:23+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 85, longevity 100
- inputs: {"age_days": 2836, "days_push": 7, "days_rel": 22, "gap_med": 32.0, "n_releases_24m": 21}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12111, forks 1756 (observed 2026-08-28T04:10:51.774591+00:00)

## What it is
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper, providing both a Core SQL expression language with connection pooling and schema management, and an optional ORM built on data mapper patterns. It supports many database backends through dialects and offers both synchronous and asyncio APIs.

## Use cases
- map python classes to database tables with an orm
- build sql queries programmatically in python
- connect to postgresql mysql sqlite from python
- introspect and generate database schemas
- manage database connection pooling in a web app
- write async database code with asyncio

## When to choose
- you need a mature, feature-rich orm or sql abstraction in python
- you want fine-grained control over generated sql while staying pythonic
- you work with multiple database backends through one api
- you need schema reflection, ddl generation, and complex eager loading

## When to avoid
- you want a lightweight query builder with minimal abstraction and prefer raw drivers
- you use a non-python stack
- you need automatic schema migrations out of the box (use alembic alongside)

## Facets
- artifact type: library
- maturity: stable
- function: orm, database, database-driver, serialization
- domain: databases, backend, web-development, developer-tools
- platform: python, cross-platform
- tags: sql-expression-language, connection-pooling, schema-migration, asyncio-support, database-abstraction

## Member repositories
- sqlalchemy/sqlalchemy (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:51.774591+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:14:55.669364+00:00, confidence not recorded.
  - readme: https://github.com/sqlalchemy/sqlalchemy (fetched 2026-08-28T04:10:51.774591+00:00, sha 4cab00c710b0)
  - homepage: https://www.sqlalchemy.org (fetched 2026-08-29T08:12:30.987305+00:00, sha 12dd3644edcb)
  - site_page: https://www.sqlalchemy.org/features.html (fetched 2026-08-29T08:12:30.996468+00:00, sha 1aed45833c2f)
  - site_page: https://docs.sqlalchemy.org (fetched 2026-08-29T08:12:30.999476+00:00, sha 89c3a9f507dc)
  - site_page: https://docs.sqlalchemy.org/intro.html (fetched 2026-08-29T08:12:31.004875+00:00, sha 863869270304)
  - site_page: https://docs.sqlalchemy.org/orm/quickstart.html (fetched 2026-08-29T08:12:31.006997+00:00, sha e3f07adbaa7d)
  - site_page: https://www.sqlalchemy.org/docs/21/changelog/migration_21.html (fetched 2026-08-29T08:12:31.014033+00:00, sha 5349ee2ca4e5)
  - site_page: https://www.sqlalchemy.org/docs/21 (fetched 2026-08-29T08:12:31.018301+00:00, sha 79a6378ec549)
  - site_page: https://www.sqlalchemy.org/library.html (fetched 2026-08-29T08:12:31.002200+00:00, sha 2610adc06d4b)
  - site_page: https://www.sqlalchemy.org/changelog/CHANGES_2_1_0b3 (fetched 2026-08-29T08:12:31.009442+00:00, sha c2456e854992)
- Data as of 2026-08-30T08:39:29.467469+00:00.
