aioodbc
ODBC driver for asyncio.
What it is and what it does
aioodbc is an asyncio wrapper around pyodbc that lets you query ODBC databases without blocking the event loop. It uses a thread pool internally to run blocking pyodbc calls, mirroring the approach taken by other async database drivers. The API mirrors pyodbc closely—you use await instead of synchronous calls—so if you know pyodbc, the transition is straightforward.
The package supports connection pooling with optional connection recycling, context managers for safe resource cleanup, and works with both the default asyncio event loop and uvloop. It targets Python 3.7+ and has been tested with versions up to 3.12. Since it delegates to pyodbc, it works with any ODBC data source depending on what drivers you have installed.
Use it for:
- Building async web services that need to query legacy ODBC-only databases without blocking.
- Async ETL pipelines that pull data from multiple ODBC sources concurrently.
- Connection pooling for high-concurrency async applications to avoid exhausting system resources.
- Migrating existing pyodbc code to async/await without rewriting database logic.
- Testing async code paths that interact with ODBC databases using context managers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
aioodbc provides async/await access to ODBC databases by wrapping pyodbc with asyncio support, using threads internally to avoid blocking the event loop.
Yes, if you need async access to ODBC databases and are comfortable with the dormant maintenance status. The package is stable, has no known vulnerabilities, and the API is mature. However, if you require active maintenance or are starting a new greenfield project, consider whether a more actively maintained async driver for your specific database might be a better fit.
Install
aioodbc on PyPI
pip
pip install aioodbcuv
uv add aioodbcpoetry
poetry add aioodbcInstalling aioodbc
Before you install
Low friction install with a single runtime dependency (pyodbc). Maintenance is dormant—last release was 2023-10-28 over a year ago—but the repository remains active and the package is stable enough for production use in async contexts.
License in practice
Licensed under Apache 2 (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations.
Quickstart
pip install aioodbc
import asyncio
import aioodbc
async def query():
conn = await aioodbc.connect(dsn="Driver=SQLite;Database=db.db")
cur = await conn.cursor()
await cur.execute("SELECT 42;")
rows = await cur.fetchall()
await cur.close()
await conn.close()
asyncio.run(query())
Requires unixODBC library and a corresponding ODBC driver installed on the system (e.g., libsqliteodbc for SQLite).
Verify before relying
- Whether the dormant maintenance status poses risk for future Python or asyncio API changes.
- Performance characteristics compared to other async database drivers in production workloads.
- Thread pool sizing and tuning guidance for high-concurrency scenarios.
Package facts
| License | Apache 2 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyodbc |
| Maintenance | dormant — 1,021 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,672,711/month — #3,665 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aioodbc-0.5.0-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
aiomysqlaiomysql provides async/await access to MySQL…
permissive · top 5,000 on PyPI
pyodbcpyodbc provides Python access to ODBC databases…
permissive · top 1,000 on PyPI
aiodockerProvides async/await bindings for the Docker…
permissive · top 5,000 on PyPI
aiopgaiopg provides asyncio-based access to…
permissive · top 15,000 on PyPI
pypyodbcpypyodbc provides a pure Python ODBC interface…
permissive · top 15,000 on PyPI
hopsworks-aiomysqlAsync MySQL database driver for Python asyncio…
permissive · top 15,000 on PyPI
asynchasynch is an asynchronous ClickHouse driver…
permissive · top 5,000 on PyPI
asyncmyasyncmy is an asyncio-native MySQL/MariaDB…
permissive · top 5,000 on PyPI
anysqliteAnysqlite wraps SQLite with an async/await…
unclear · top 5,000 on PyPI
pyadomdPyadomd provides a Python interface to query…
permissive · top 15,000 on PyPI