Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.
Latest commit message
Commit time
Mar 15, 2018
Apr 11, 2018


Python Toolkit

PyKit is a Python wrapper for DB2Sock.

As of major version zero, PyKit only supports an HTTP REST transport. Before trying to use PyKit, please be sure to have DB2Sock up and running with an HTTP transport available. Follow the DB2Sock Instlalation Instructions and setup either nginx or apache.

PyKit Setup

PyKit is not an official Python Package quite yet, so install it like any package that is in development.

Clone repository

You'll need the PyKit source to install

$ git clone

Use pip3 to install PyKit

PyKit uses Python 3, so be sure to use pip3 when installing.

$ cd pykit
$ pip3 install ./pykit

If you're having trouble installing a new version of PyKit, try running install with --upgrade

$ pip3 install --upgrade ./pykit

Testing PyKit

Unit tests are in place for PyKit. To run them, use the normal command.

$ cd /path/to/source/of/pykit/
$ python3 -m unittest

PyKit requires the transport information be setup to run tests. These are setup with bash environment variables. If you're running the test for the first time and don't have the bash variables defined somewhere, you'll probably need to do something like:

$ export PK_DB2SOCK_URL=''; export PK_DB2SOCK_USER=db2_user; export PK_DB2SOCK_PASS=db2_password;
$ cd /path/to/source/of/pykit
$ python3 -m unittest