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
.

Boilerplate



Rdbhost is a tool for getting simple web apps going quickly.

In support of that position, we now have boilerplate bundles; these are downloadable zip files that can be unzipped to your harddrive, and immediately function as simple applications.  Your account information is already embedded in each, so it will just run, and access your Rdbhost account as necessary.

The wizard collects from you the necessary information to create the boilerplate bundle.  After the wizard completes, you can download the relevant bundles from the boilerplate page; each includes a README.txt with starter instructions.


For now, there are as many as three boilerplate bundles, depending on your wizard selections; one for the Python Rdbhdb module, one for Python's SQLObject, and one for a JavaScript web app.  There will be more, in time, including options for html boilerplate, and these (especially the JavaScript bundle) will be enhanced.

Try them out, let me know if they don't behave as expected.

David Keeney
dkeeney@rdbhost.com