pypyodbc
A Pure Python ctypes ODBC module
What it is and what it does
pypyodbc is a pure Python ODBC interface that lets you connect to databases like SQL Server and Microsoft Access without needing compiled C extensions. It reimplements the pyodbc API using ctypes to call system ODBC drivers directly, making it portable across CPython, PyPy, and IronPython on Windows, Linux, and macOS. The entire module is a single Python script with less than 3000 lines, so you can even use it by copying the file into your project without installing it.
You use it much like pyodbc: create a connection with a connection string, get a cursor, execute SQL queries with parameter binding, and fetch results. It handles both simple queries and parameterized statements, and can work with Microsoft Access databases including built-in functions for creating and compressing MDB files on Windows. However, the package is dormant—the last release was in December 2021, and there have been no updates since then.
Use it for:
- Connect to SQL Server databases from Python scripts on systems where pyodbc cannot be compiled or installed
- Access Microsoft Access MDB files programmatically, including creating new databases on Windows
- Write database code that runs unchanged on PyPy or IronPython, not just CPython
- Migrate legacy pyodbc code to a pure-Python alternative when binary dependencies are unavailable
- Query databases from embedded or restricted Python environments where C extensions cannot be loaded
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pypyodbc provides a pure Python ODBC interface for connecting to databases like SQL Server and Microsoft Access without requiring compiled extensions, using ctypes to call ODBC drivers.
No—unless you have a specific constraint that prevents using pyodbc (e.g., PyPy or IronPython, or a system without a C compiler). pypyodbc is dormant, with no releases since December 2021 and no active maintenance. For standard CPython use cases, pyodbc is actively maintained and more reliable. If you do need pure Python ODBC, verify compatibility with your database driver and Python version before committing to it.
Install
pypyodbc on PyPI
pip
pip install pypyodbcuv
uv add pypyodbcpoetry
poetry add pypyodbcInstalling pypyodbc
Before you install
Installation friction is high due to lack of runtime dependencies but the package is dormant—last release was 2021-12-23, over 1695 days ago. The codebase is archived and no longer actively maintained, though the repository remains available.
License in practice
MIT license is permissive and imposes minimal restrictions; you can use, modify, and distribute pypyodbc freely in commercial or private projects with only attribution required.
Quickstart
import pypyodbc
connection_string = 'Driver={SQL Server};Server=localhost;Database=mydb;UID=user;PWD=pass;'
db = pypyodbc.connect(connection_string)
cursor = db.cursor()
cursor.execute("SELECT * FROM table_name")
row = cursor.fetchone()
cursor.close()
db.close()
Requires an ODBC driver installed and configured on the system for the target database (e.g., SQL Server ODBC Driver, Microsoft Access driver); the package itself is pure Python but depends on system-level ODBC infrastructure.
Verify before relying
- Current compatibility with modern Python versions (3.8+) and recent database driver versions
- Whether the package works reliably with contemporary SQL Server versions beyond 2008
- Status of Access MDB file creation features on current Windows systems
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 1,695 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,487/month — #13,582 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pypyodbc-1.3.6.tar.gz
Keywords: Python, Database, Interface, ODBC, PyPy
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
intersystems-irispythonProvides Python bindings to connect to and…
unclear · top 15,000 on PyPI
pyodbcpyodbc provides Python access to ODBC databases…
permissive · top 1,000 on PyPI
mssql-pythonA Python driver for connecting to and querying…
unclear · top 5,000 on PyPI
mssqlWraps SQLAlchemy and pyodbc to simplify…
permissive · top 15,000 on PyPI
aioodbcaioodbc provides async/await access to ODBC…
permissive · top 5,000 on PyPI
databricks-dbapiProvides a DBAPI 2.0 connection interface and…
permissive · top 15,000 on PyPI
pyseccomppyseccomp provides a pure-Python interface to…
permissive · top 5,000 on PyPI
mssql-djangoDjango database backend that connects Django…
permissive · top 15,000 on PyPI
mssql-python-odbcProvides platform-specific Microsoft ODBC…
unclear · top 15,000 on PyPI
access-parserParses Microsoft Access database files (.mdb…
permissive · top 15,000 on PyPI