I'm pleased to announce the release of couchable 0.0.2b1. This is the
second beta release of the library; for more information on the
version scheme, please see the blog (below).
Couchable is a library that allows arbitrary Python objects to be
stored in CouchDB (including things like tuple dict keys, nested child
objects, and C-based objects), while keeping the in-CouchDB document
as "natural" as possible to facilitate working with the data in
non-Python contexts.
Couchable is different from other Python client libraries because of
how it attempts to be able to round-trip arbitrarily complex Python
objects through CouchDB. The other libraries that I am aware of aim
to expose CouchDB documents as Python objects, which means that they
are essentially limited to the common subset of JSON and Python.
An example document:
{
"_id":
"couchable.test_couchable.SimpleDoc:c836c2fe-cb10-4e5e-9e4a-0126f0958700",
"_rev": "1-62cc28141a8559513e832d9e6bd28e18",
"name": "mySimpleInstance",
"field1": 2.3,
"field2": [0, "one"],
"otherObj":
"couchable:id:couchable.test_couchable.SimpleDoc:29697244-eee0-401e-9e68-666c6c34d5ad",
"couchable:": {
"src_md5": "780282285e7016750368a3f170ee3217",
"class": "SimpleDoc",
"module": "couchable.test_couchable"
}
}
A detailed introduction can be found on my blog:
http://blog.nopinch.net/2010/10/02/couchable-what-is-it-good-for/
For more information, please see:
API docs: http://packages.python.org/couchable
Blog: http://blog.nopinch.net/tag/couchable
Package: http://pypi.python.org/pypi/couchable
Source: http://github.com/wickedgrey/couchable
Major changes in this release:
- Numerous bug fixes, typically relating to various corner cases in
the packing code (child objects with _private fields, etc.).
- Change to use attached pickles to store objects that don't have a
__dict__ and haven't had a more specific packer function provided.
This makes objects with C-based children Just Work, though they are
opaque at the CouchDB level.
- Added the ability to add views that only emit records for the specified type.
- Cleaned up the ability to feed the output of a view into .load(...)
and have it do the right thing.
Questions, comments, suggestions, bug reports, etc. welcome! :)
Thanks for reading,
Eli