Skip to main content

Provides support for DB2 for iSeries for remote python clients using IBM i Access Client Solutions ODBC driver

Project description

i Access Db2 SQLAlchemy Driver

https://img.shields.io/pypi/v/iaccess.svg https://img.shields.io/travis/soundstripe/iaccess.svg Documentation Status

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 to apt-get install unixodbc-dev if 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.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iaccess-0.4.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iaccess-0.4.0-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file iaccess-0.4.0.tar.gz.

File metadata

  • Download URL: iaccess-0.4.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for iaccess-0.4.0.tar.gz
Algorithm Hash digest
SHA256 96bb0ba8f51bf598624550692c452c2b6130022a1e9d6856d22f5a82ff0752fa
MD5 bbc439feb97daa3a1fab1ae7aa586302
BLAKE2b-256 ccf1a5b1ae08a2b17229858b7fdc96baf0cd9c96176da2b655c11935cf127c7d

See more details on using hashes here.

File details

Details for the file iaccess-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: iaccess-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for iaccess-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 de82278f4841d9c09ae781e65d57ce9a231892d02d002e8637cfe51f60222d67
MD5 cd181a7ae0056bd5290fb091ae3889d5
BLAKE2b-256 338284ac5ff166ae65356e5bea890732e3003058fbcf7af4b8bddd3cbc10cfe9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page