skillfed

pypyodbc

A Pure Python ctypes ODBC module

pypyodbc v1.3.6 90.5K downloads/30d#13,582 on PyPI63
Permissive license MIT DORMANT released

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 pypyodbc

uv

uv add pypyodbc

poetry

poetry add pypyodbc

Installing 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

Development Status :: 4 - BetaLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python

Tags

ODBC database connection pythonpure python database driverSQL Server access from Pythoncross-platform ODBC interfacepyodbc alternative pure pythonctypes ODBC wrapperdatabase connectivity without compilation
database-driverdormant-maintenance

More Database packages