Skip to content

Instantly share code, notes, and snippets.

@aabril
Created February 2, 2012 14:55
Show Gist options
  • Select an option

  • Save aabril/1723829 to your computer and use it in GitHub Desktop.

Select an option

Save aabril/1723829 to your computer and use it in GitHub Desktop.
connect and create a couch database from python code
# import
from couchdb.client import Server
# connection
server = Server('http://localhost:5984')
server.resource.credentials('username','password')
# create a database
db = server.create('mycouchdb')
# create a document
db['foo']= dict(bar="bar", 'fighters'= 1337 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment