# encode/databases

Async database support for Python. 🗄

Repository: https://github.com/encode/databases
Canonical: https://ross.abutalabs.com/products/databases
Homepage: https://www.encode.io/databases/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: sqlite, postgres, mysql, asyncio, sqlalchemy
Archived: true
Last push: 2024-05-21T19:58:17+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2770, "days_push": 834, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3994, forks 264 (observed 2026-08-28T04:08:31.902255+00:00)

## What it is
A Python library providing simple asyncio support for PostgreSQL, MySQL, and SQLite databases, with query building via the SQLAlchemy Core expression language. It is designed to integrate with async web frameworks like Starlette, FastAPI, Sanic, and aiohttp.

## Use cases
- run async database queries in Python with asyncio
- use SQLAlchemy Core queries with async drivers
- connect to PostgreSQL, MySQL, or SQLite from FastAPI or Starlette
- execute parameterized queries and bulk inserts asynchronously
- swap between asyncpg, aiomysql, and aiosqlite drivers behind one interface

## When to choose
- you need async database access in an asyncio-based web app
- you want SQLAlchemy Core query building without a full ORM
- you want a uniform async API across Postgres, MySQL, and SQLite

## When to avoid
- you need a full ORM with relationships and unit-of-work (use SQLAlchemy 2.0 async instead)
- you need databases beyond PostgreSQL, MySQL, or SQLite
- you need a synchronous database layer

## Facets
- artifact type: library
- maturity: maintenance
- function: database, database-driver, orm
- domain: databases, backend, web-development, developer-tools
- platform: python, cross-platform
- tags: asyncio, sqlalchemy-core, asyncpg, aiosqlite, aiomysql, asyncmy, aiopg, postgresql, mysql, sqlite, async-web-frameworks

## Member repositories
- encode/databases (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:31.902255+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-29T18:24:12.033864+00:00, confidence not recorded.
  - readme: https://github.com/encode/databases (fetched 2026-08-28T04:08:31.902255+00:00, sha 0a90a62c9dbf)
  - homepage: https://www.encode.io/databases/ (fetched 2026-08-29T09:17:21.073928+00:00, sha 86d21aa10cd9)
  - registry_pypi: https://pypi.org/pypi/databases/json (fetched 2026-08-29T09:17:21.083207+00:00, sha a03394ac527f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
