In order to access Db2 for z/OS from Python, you need to install the ibm_db driver and have a proper license file.
To install the driver:
$ easy_install ibm_db
Then copy the IBM CLI license (should be named db2consv_zs.lic) to the license folder of where ibm_db clidriver was installed, (e.g. /usr/local/lib/python3.5/site-packages/ibm_db-2.0.7-py3.5-macosx-10.6-intel.egg/clidriver/license). If you are unsure where it was installed on your environment, you could use locate clidriver command to find it.
If you are doing this on Mac, you may need to explicitly add couple of paths to DYLD_LIBRARY_PATH:
$ export DYLD_LIBRARY_PATH=[your path to clidriver]/lib:$DYLD_LIBRARY_PATH
$ export DYLD_LIBRARY_PATH=[your path to clidriver]/lib/icc:$DYLD_LIBRARY_PATH
Refer to https://github.com/ibmdb/python-ibmdb/tree/master/IBM_DB/ibm_db for more details.
After you installed the driver and got your license in place, start Python and verify that you can connect:
>>> import ibm_db
>>> conn = ibm_db.connect('DATABASE=x;HOSTNAME=x;PORT=x;PROTOCOL=TCPIP;UID=x;PWD=x;','','')
Replace x, in the command above with the appropriate values of the location name, hostname, port, user name, and password.
References
You can visit the ibm_db driver page at https://pypi.python.org/pypi/ibm_db/
It lists all supported Python versions (at the time of this writing: 2.6, 2.7, 3.3, 3.4, 3.5). You can also download the latest version.
https://github.com/ibmdb/python-ibmdb contains some info on APIs, installation details, etc.