This article is obsolete. Please refer to the following articles for up do date instructions: Ruby/Rails and DB2 | Python/Django and DB2. Thank you!
I’m glad to inform you that the beta version of the Python and DB2 (IBM databases to be more exact) driver and DBI wrapper have been released in the Python Package Index. You can download the source for version 0.1.0 from here. This includes two components:
-
An IBM defined API based driver to access IBM databases (entirely similar to the Ruby and PHP ones)
-
A Python DBI based wrapper to access IBM databases
The DBI wrapper utilizes the IBM defined API driver, but you can also use the feature-rich API indipendently without the DBI wrapper.
I plan to provide a few examples about the usage of the IBM specific API. The Python driver is almost identical to the Ruby one, hence I may create a joined post for both languages. Now go try it and have fun. If you have any questions, feel free to comment below or send an email to the address opendev@us.ibm.com.
Get more stuff like this
Subscribe to my mailing list to receive similar updates about programming.
Thank you for subscribing. Please check your email to confirm your subscription.
Something went wrong.
1. Is any DB API 2.0 compatibility planned?
2. Will windows binaries be provided?
Hurah!
Too bad it wasn’t mature enough for the DB2 9.5 release. 🙁
Now .. about sqlalchemy.. 😉
2nd #Oleg…
Will also need eggs and binaries for standard platforms, since I NEVER count on any software I have to compile myself (eggs help make the compilation process pretty seamless…); sorry, but my tech support guys are not C programmers, and don’t know what the hell a header file is, so when the compilation fails (always when you need the software the most), they can’t fix it without having to call little old me.
For the poor guys that need to install the Python driver in Windows 32bit (I installed in Windows XP Pro) the instructions in the README file are useless (because the info from URL http://wiki.tcl.tk/11431 is too old and the Visual C++ 2005 Express offered by Microsoft instead is binary incompatible with the Visual Studio 2003 used to build the Python interpreter).
However, you can use the MinGW compiler. I installed the 5.1.3 (from SourceForge) and build the driver with the commands:
python setup.py build –compiler=mingw32
python setup.py install –skip-build
http://code.djangoproject.com/ticket/5052