Registry / database / sqlalchemy-ibmi

sqlalchemy-ibmi

JSON →
library0.9.3pypypi✓ verified 83d ago

Provides SQLAlchemy dialects for Db2 on IBM i (AS/400), enabling ORM and core SQL access. Current version 0.9.3, supporting Python >=3.6.2. Maintained as part of the IBM i open source ecosystem.

pip install sqlalchemy-ibmi
INSTALL
IMPORT
SIG · SQLALCHEMY-IBMI
S
sqlalchemy-ibmi
databasepythonv0.9.3
Install
3.7s avg
Import
548ms
Disk
37MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.586s · 42.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.510s · 34MB
37MB installed
● package 37MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_engine
from sqlalchemy import create_engine
from sqlalchemy import create_engine

Minimal working example: connect to IBM i via ibmi:// URL and run a query.

from sqlalchemy import create_engine engine = create_engine('ibmi://user:password@host/database') with engine.connect() as conn: result = conn.execute("SELECT * FROM SYSIBM.SYSDUMMY1") print(result.fetchone())
Debug
Known issues
gotchaThe default driver is pyodbc. If pyodbc is not installed, you will get an ImportError about 'ibmi_db_api'. Install sqlalchemy-ibmi with the 'pyodbc' extra: pip install sqlalchemy-ibmi[pyodbc]
fix
pip install sqlalchemy-ibmi[pyodbc]
affects: all
breakingSQLAlchemy 2.0 changed the future import pattern. sqlalchemy-ibmi <0.9.x may not support SQLAlchemy 2.0 fully. Ensure you are on 0.9.3 and use SQLAlchemy 2.0 compatible code.
fix
Use create_engine with future=True: create_engine('ibmi://...', future=True) or simply upgrade to latest.
affects: >=0.9.0
deprecatedThe old connection string format with pyodbc:// is being deprecated. Prefer ibmi://.
fix
Switch to ibmi://user:password@host/database
affects: <0.9.0
Upgrade
Version history
0.9.3latest on PyPI · released Dec 14, 2023
Audit
Dependencies
sqlalchemyrequiredCore dependency for ORM and engine
pyodbcoptionalDefault DB-API driver for IBM i (non-optional via pip extras)
Agent activity
14 hits · last 30 days
node
10
Meta
1
OpenAI (training)
1
Resources
sqlalchemy-ibmi — pip install sqlalchemy-ibmi · libregistry