Sunday, December 9, 2012

Rdbhdb, now for Python 3



Our DB API 2 module, called Rdbhdb, now suppports Python 3.


In the process of updating, I found a good new module.

The Python 2 version used the 'encode' module from the Poster package.  That module has not been ported to Python 3, so I went looking for a new module to do multipart form-data encoding.  I found the Requests package on PyPI, and borrowed the 'filepost' module from that.  It works well.  In my search, I had opportunity to look over the Requests API, and it is an elegant API, doing the http request functionality in straightforward ways.  If I were writing my own module now, I would use Requests, in lieu of HttpLib/Urllib as I did.


Back to Rdbhost: the new Rdbhdb module is in the same Github repository as the old, where the two are seperated into different folders.  Each is complete, with setup.py and test suite.


David Keeney

https://github.com/rdbhost/Rdbhdb
http://www.rdbhost.com
https://www.rdbhost.com/howpython.html
.

No comments:

Post a Comment