sqlalchemy-ibmi
SQLAlchemy support for Db2 on IBM i
What it is and what it does
sqlalchemy-ibmi is a SQLAlchemy dialect that bridges SQLAlchemy's ORM and query construction to Db2 running on IBM i systems. It translates SQLAlchemy expressions into SQL compatible with IBM i's Db2 engine and manages connections through the IBM i Access ODBC Driver. The adapter supports SQLAlchemy 1.4 and 2.0, and works with Python 3.10 through 3.14.
The package is actively developed but still in beta. It has known limitations around non-standard SQL, certain foreign key operations, and subqueries in specific JOIN contexts. Users need the IBM i Access ODBC Driver installed separately on their system to establish connections. The adapter is suitable for applications that need to query or manipulate data on IBM i systems using SQLAlchemy's familiar Python API.
Use it for:
- Build Python applications that query and update Db2 tables on IBM i using SQLAlchemy ORM without writing raw SQL.
- Migrate or integrate legacy IBM i systems with modern Python web frameworks that rely on SQLAlchemy.
- Automate data extraction and transformation pipelines from IBM i Db2 databases in Python.
- Use SQLAlchemy's reflection capabilities to auto-discover IBM i table schemas and generate ORM models.
- Connect Python data analysis or reporting tools to IBM i Db2 as a backend data source.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a SQLAlchemy dialect to connect to Db2 on IBM i systems using ODBC, enabling ORM and SQL query construction against IBM i databases.
Yes, if you need SQLAlchemy access to Db2 on IBM i and have the IBM i Access ODBC Driver available. The package is actively maintained, has low install friction, carries a permissive license, and supports current Python versions. The beta status and known limitations (non-standard SQL, certain foreign key operations) mean you should verify your specific use case works before relying on it in production.
Install
sqlalchemy-ibmi on PyPI
pip
pip install sqlalchemy-ibmiuv
uv add sqlalchemy-ibmipoetry
poetry add sqlalchemy-ibmiInstalling sqlalchemy-ibmi
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-07-09. Requires Python 3.10+ and the IBM i Access ODBC Driver to be installed separately on the system.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install sqlalchemy-ibmi
import sqlalchemy as sa
engine = sa.create_engine("ibmi://user:password@host.example.com")
cnxn = engine.connect()
metadata = sa.MetaData()
table = sa.Table('table_name', metadata, autoload=True, autoload_with=engine)
result = cnxn.execute(sa.select([table]))
IBM i Access ODBC Driver must be installed on the system; Python 3.10+ required; IBM i 7.5 or later recommended.
Verify before relying
- Whether all connection options work with IBM i Access Client Solutions Application Package versions older than 1.1.0.29.
- Performance characteristics and scalability limits for large result sets or complex queries.
- Compatibility with SQLAlchemy async features or async connection pools.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pyodbc, sqlalchemy |
| Maintenance | actively maintained — 36 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 222,108/month — #9,270 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqlalchemy_ibmi-0.9.4-py3-none-any.whl
Keywords: sqlalchemy, database, ibm, ibmi, db2
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
ibm-dbPython driver for connecting to IBM Db2 for LUW…
permissive · top 5,000 on PyPI
ibm-db-saSQLAlchemy dialect adapter that enables Python…
permissive · top 15,000 on PyPI
sqlalchemy-jdbcapiSQLAlchemy dialect for JDBC and ODBC database…
permissive · top 15,000 on PyPI
sqlalchemy-drillSQLAlchemy dialect for Apache Drill that…
permissive · top 5,000 on PyPI
sqlalchemy-dremioProvides a SQLAlchemy dialect to query Dremio…
permissive · top 15,000 on PyPI
sqlalchemy_exasolSQLAlchemy dialect that enables Python…
permissive · top 15,000 on PyPI
teradatasqlalchemyProvides a SQLAlchemy dialect that enables…
unclear · top 5,000 on PyPI
sqlalchemy-hanaProvides a SQLAlchemy dialect that enables you…
permissive · top 15,000 on PyPI
sqlalchemy-firebirdProvides a SQLAlchemy 2.0+ dialect for…
permissive · top 15,000 on PyPI
sqlalchemy-vertica-pythonProvides a SQLAlchemy dialect for Vertica using…
permissive · top 15,000 on PyPI