/pghstore

PostgreSQL hstore formatter

Primary LanguagePythonOtherNOASSERTION

pghstore

Build Status

This small module implements a formatter and a loader for hstore, one of PostgreSQL supplied modules, that stores simple key-value pairs.

>>> dumps({'a': '1'})
'"a"=>"1"'
>>> loads('"a"=>"1"')
{'a': '1'}
>>> src = [('pgsql', 'mysql'), ('python', 'php'), ('gevent', 'nodejs')]
>>> loads(dumps(src), return_type=list)
[('pgsql', 'mysql'), ('python', 'php'), ('gevent', 'nodejs')]

You can easily install the package from PyPI by using pip or easy_install:

$ pip install pghstore

Visit the website to read its documentation:

http://dahlia.github.com/pghstore/

Changelog

Version 0.9.2

Released on May 3, 2012.

  • Fixed escaping of quotes and backslshes. Patched by Dan Watson (#2).

Version 0.9.1

Released on January 2, 2012.

  • Now it is aware of NULL values. NULL values become None in Python and vice versa.

Version 0.9.0

Released on December 22, 2011.

  • Initial version.