Code Monkey home page Code Monkey logo

iaccess's Introduction

i Access Db2 SQLAlchemy Driver

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. There are repos available for major Linux distributions.
  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.