Created
January 31, 2012 19:34
-
-
Save swarbhanu/1712443 to your computer and use it in GitHub Desktop.
A small script to do couchdb operations in coi-services.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyon.datastore.couchdb.couchdb_datastore import CouchDB_DataStore | |
db = CouchDB_DataStore() | |
# Creates a datastore | |
datastore_name = 'dm_datastore' | |
db.create_datastore(datastore_name) | |
# Create a document | |
document1 = {'BlogAuthor': {'name' : 'roger', 'email': 'rabbit.com'}} | |
_id, _rev = db.create_doc(document1, None, datastore_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment