#!/usr/bin/python from desktopcouch.records.server import CouchDatabase import desktopcouch.records import json record_type = "http://gwibber.com/couch/message" messages_db = CouchDatabase("gwibber_messages", create=False) results = messages_db.get_records(record_type = record_type, create_view = False) print "There are a total for %s messages" % results.total_rows for result in results: message = result.value print "Message from: %s" % message["sender"]["name"] print message["content"]