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 is not an official Python Package quite yet, so install it like any package that is in development.
You'll need the PyKit source to install
$ git clone firstname.lastname@example.org:Club-Seiden/pykit.git
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
$ pip3 install --upgrade ./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='http://127.0.0.1:8088/db2json.db2'; export PK_DB2SOCK_USER=db2_user; export PK_DB2SOCK_PASS=db2_password; $ cd /path/to/source/of/pykit $ python3 -m unittest