i Access Db2 SQLAlchemy Driver
Provides support for DB2 for iSeries for remote python clients using IBM i Access Client Solutions ODBC driver. On up-to-date systems (7.2+ with latest PTFs) you can also use this driver locally on your i Series machine, making local development of server code more feasible.
Other work in this area includes the ibm_db and ibm_db_sa projects, which also provide access to DB2 and support SQLAlchemy. Those two packages rely on and automatically install a binary driver for DB2, while this package relies on you already having install the i Access Client Solutions ODBC driver available on IBM’s support/download site.
Free software: MIT license
Installation
Pre-requisites
UnixODBC (if on Linux or in PASE for i): Windows ships with ODBC installed, but on Linux you’ll need unixodbc. On Ubuntu you can install this with
apt-get install unixodbc. You may also need toapt-get install unixodbc-devif you get errors about a missing sql.h file.i Access Client Solutions ODBC driver: You’ll need this driver available only from IBM.
IBM i 7.2+ on your target system: Older versions of the OS may work but I have not tested against them. If you do not happen to have an IBM Power system sitting around your house (although who doesn’t?!) you may be able to get an account to play with at Pub400.com.
Install via pip
Use pip to download and install the latest released version of this tool.:
pip install iaccess
Install via setup.py
Download or clone this repo and install via setup.py:
python setup.py install
Quickstart
If you know what you’re doing with SQLAlchemy this package should be nearly invisible to you with the exception of the URI used to connect to the database.:
# connect via hostname / ip address
>>> from sqlalchemy import create_engine
>>> engine = create_engine('iaccess+pyodbc://user:password@hostname/dummy?DBQ=DEFAULT_SCHEMA') # `dummy` can be any string
# connect via named ODBC DSN
>>> from sqlalchemy import create_engine
>>> engine = create_engine('iaccess+pyodbc://user:password@dsn_name')
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
The IBM i Access ODBC Driver is developed and licensed separately by IBM.
Continuous integration testing is performed against the system available from the great guys at Pub400.com.
History
0.4.2 (2022-04-22)
SERVER= is case-sensitive some versions of iaccess driver
0.2.1 (2020-10-20)
Add compilation of mod (%) operator to MOD() function, casting as bigint
0.2.0 (2020-04-02)
Warn when i Access driver is not found
0.1.4 (2020-04-01)
Fix deployment issue
0.1.2 (2020-04-01)
Fix entrypoint definition
0.1.1 (2020-04-01)
Remove Python 3.5 from list of supported versions
Fix deployment issue: correct PYPI key encryption
0.1.0 (2020-04-01)
First release on PyPI.
Metadata
Release files for iaccess 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iaccess-0.6.0.tar.gz | 20.4 kB | Without provenance | Details for iaccess-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iaccess-0.6.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for iaccess-0.6.0-py2.py3-none-any.whl |
Total release size: 32.8 kB
Release files / iaccess-0.6.0.tar.gz
| Download URL | iaccess-0.6.0.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2a64d3194f22c69fa324b77cb3b7043b4d04be4856dc02ce73d2bee4e17b9e7
|
|
BLAKE2b-256 checksum How to use checksums |
7696e7a1c5387e8bcacb68cabe7f8714928b65ae013ac519e34c66e0117895f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|
Release files / iaccess-0.6.0-py2.py3-none-any.whl
| Download URL | iaccess-0.6.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c4fde07dd8bb75164c4566e73ea7d577f3f2873662144aa4c8cc7a2052699167
|
|
BLAKE2b-256 checksum How to use checksums |
3c14fbc32ac3239432767a2e332c4cf229ead6856383ed4231393ae08329dc44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.3
|
Security for iaccess 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.