Listen to database changes
couchdbkit 0.6.0 introduced a new API to listen for CouchDB changes.
The `couchdbkit.changes` modules allows you to listen for changes with a
streaming API.
couchdbkit 0.6.0 introduced a new API to listen for CouchDB changes.
The `couchdbkit.changes` modules allows you to listen for changes with a
streaming API.
Since the 0.10 release of CouchDB, it’s possible to listen on db changes via the REST api.
The `couchdbkit.Consumer` object provides you a way to listen on these changes asynchronously (continuous changes) or just wait for one change (longpolling). You can of course just fetch changes since the last update sequence.
There are a lot of people trying to integrate CouchDB in their Django application. Most of the implementations are very complicated. So I decided to release the code of couchdbkit extension for Django 1.0x.
This extension provides you a threadsafe access and management of documents and views in your django application with some useful tools specific to Django.
Building an external handler with couchdbkit is easy. The only thing you have to do is to create an object inheriting from `couchdbkit.external` module.
Here is a little snippet that shows you how to handle the example external process from CouchDB wiki with couchdbkit.
In the Django extension, I wrote the object `DocumentForm` that allows you to create a Django Form class based on a Document class or instance of a Document.
But you don’t need to use Django to have this facility in your web application. If you use Pylons you may already know FormAlchemy. FormAlchemy was originaly developped to map SQLAlchemy object in a form but it now contains an extension for Couchdbkit too.
This tutorial exposes key features of this library mainly through code
examples. For in-depth description of the modules, you’ll want to read
the API documentation.
If you have not installed couchdbkit yet, follow instructions on download page . Once you’ve done, you can write your first CouchDB document:
Couchdbkit allows you to manage you design docs and docs on the file system.
A system will be provided to manage view creation and other things. As some noticed, this system works like couchapp.