trombi 0.9.2

CouchDB client for Tornado

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Inoi Oy
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Database \ Database APIs
Trombi is an asynchronous CouchDB client for Tornado.

trombi is Finnish for a small tornado, occuring in Europe.

Example program

import trombi
from tornado.ioloop import IOLoop

def main():
 server = trombi.Server('http://localhost:5984')
 server.get('my_database', database_created, create=True)

def database_created(db):
 if db.error:
 print 'Unable to create database!'
 print db.msg
 ioloop.stop()
 else:
 db.set('my_document', {'testvalue': 'something'}, doc_created)

def doc_created(doc):
 if doc.error:
 print 'Unable to create document!'
 print doc.msg
 else:
 print 'Doc added!'

 ioloop.stop()

if __name__ == '__main__':
 ioloop = IOLoop.instance()
 ioloop.add_callback(main)
 ioloop.start()


More usage examples can be found in tests.

Last updated on April 9th, 2011

requirements

#CouchDB client #database API #Tornado #CouchDB #client #database

Add your review!

SUBMIT