databases
Async database support for Python.
What it is and what it does
Databases is an async wrapper around SQLAlchemy Core that lets you execute database queries from async Python code. It abstracts over PostgreSQL, MySQL, and SQLite, accepting either raw SQL strings or SQLAlchemy Core expressions, and is built to pair with async web frameworks like FastAPI, Starlette, or aiohttp.
The package handles connection pooling and query execution in an async-friendly way, so your web handlers don't block on database I/O. You install it with a specific database driver extra (e.g., `databases[aiosqlite]` for SQLite), and then create a Database instance with a connection URL, connect to it, and call methods like `fetch_all()`, `fetch_one()`, or `execute()` with await.
Use it for:
- Building FastAPI or Starlette applications that need non-blocking database queries without blocking the event loop.
- Running bulk inserts or updates asynchronously using execute_many() in web services.
- Prototyping async database access with SQLite during development before migrating to PostgreSQL or MySQL.
- Integrating SQLAlchemy Core expressions into async web handlers without rewriting query logic.
- Supporting multiple database backends (PostgreSQL, MySQL, SQLite) with a single async interface.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides async database access for PostgreSQL, MySQL, and SQLite using SQLAlchemy Core expressions, designed for integration with async web frameworks.
No. The repository is archived and abandoned, with no releases since 2024-03-01 and no active maintenance. While the package is stable and has low install friction, its unmaintained status means it will not receive bug fixes, security patches, or compatibility updates for future Python or database driver versions. For new projects, use actively maintained alternatives like SQLAlchemy's own async support (sqlalchemy.ext.asyncio) or other modern async ORMs.
Install
databases on PyPI
pip
pip install databasesuv
uv add databasespoetry
poetry add databasesInstalling databases
Before you install
Low install friction with a single runtime dependency (sqlalchemy). However, the repository is archived and marked abandoned as of the fact sheet date, with no releases since 2024-03-01 and the last commit on 2024-05-21. This signals the project is no longer actively maintained.
License in practice
BSD license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install databases[aiosqlite]
from databases import Database
database = Database('sqlite+aiosqlite:///example.db')
await database.connect()
rows = await database.fetch_all(query='SELECT * FROM table')
Requires Python 3.8+; async context (e.g., within an async function or event loop); optional database drivers (asyncpg, aiosqlite, aiomysql, etc.) must be installed separately via extras.
Verify before relying
- Whether the abandoned status affects long-term compatibility with current async frameworks and database driver versions.
- Whether critical bug fixes or security patches are still being backported despite the archived repository status.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — sqlalchemy |
| Maintenance | abandoned — 896 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 925,551/month — #4,710 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: databases-0.9.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
advanced-alchemyAdvanced Alchemy provides sync and async…
permissive · top 15,000 on PyPI
aiomysqlaiomysql provides async/await access to MySQL…
permissive · top 5,000 on PyPI
aiosqlLoad SQL queries from files and call them as…
permissive · top 15,000 on PyPI
querysourceQuerySource provides a unified async interface…
permissive · top 15,000 on PyPI
asyncpgasyncpg is an asyncio-native PostgreSQL client…
permissive · top 1,000 on PyPI
pysqlsyncSynchronize database schemas and bulk-load data…
permissive · top 15,000 on PyPI
ormarAn async ORM for Python that unifies database…
permissive · top 15,000 on PyPI
aiopgaiopg provides asyncio-based access to…
permissive · top 15,000 on PyPI
asyncmyasyncmy is an asyncio-native MySQL/MariaDB…
permissive · top 5,000 on PyPI
asyncpg-trekManages database migrations for asyncpg by…
permissive · top 15,000 on PyPI