skillfed

sqlalchemy-ibmi

SQLAlchemy support for Db2 on IBM i

sqlalchemy-ibmi v0.9.4 222.1K downloads/30d#9,270 on PyPI37
Permissive license Apache-2.0 Active released

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-ibmi

uv

uv add sqlalchemy-ibmi

poetry

poetry add sqlalchemy-ibmi

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Database :: Front-Ends

Tags

sqlalchemy ibm i adapterdb2 ibmi odbc driversqlalchemy dialect ibmiibm i database connectionsqlalchemy db2 ormibmi odbc sqlalchemy
ibm-idb2-odbc

More Front-Ends packages

SQLAlchemy

SQLAlchemy is a Python SQL toolkit and Object…

permissive · top 100 on PyPI

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

alembic

Alembic generates and manages database schema…

permissive · top 1,000 on PyPI

weaviate-client

A Python client library for connecting to and…

permissive · top 1,000 on PyPI

databricks-sql-connector

A Python client library that connects to…

permissive · top 1,000 on PyPI

psycopg

Psycopg 3 is a PostgreSQL database adapter for…

copyleft · top 1,000 on PyPI

ibm-db

Python driver for connecting to IBM Db2 for LUW…

permissive · top 5,000 on PyPI

ibm-db-sa

SQLAlchemy dialect adapter that enables Python…

permissive · top 15,000 on PyPI

sqlalchemy-jdbcapi

SQLAlchemy dialect for JDBC and ODBC database…

permissive · top 15,000 on PyPI

sqlalchemy-drill

SQLAlchemy dialect for Apache Drill that…

permissive · top 5,000 on PyPI

sqlalchemy-dremio

Provides a SQLAlchemy dialect to query Dremio…

permissive · top 15,000 on PyPI

sqlalchemy_exasol

SQLAlchemy dialect that enables Python…

permissive · top 15,000 on PyPI

teradatasqlalchemy

Provides a SQLAlchemy dialect that enables…

unclear · top 5,000 on PyPI

sqlalchemy-hana

Provides a SQLAlchemy dialect that enables you…

permissive · top 15,000 on PyPI

sqlalchemy-firebird

Provides a SQLAlchemy 2.0+ dialect for…

permissive · top 15,000 on PyPI

sqlalchemy-vertica-python

Provides a SQLAlchemy dialect for Vertica using…

permissive · top 15,000 on PyPI