couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "Getting_started_with_Python" by TimRadvan
Date Mon, 17 Jan 2011 11:10:42 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Getting_started_with_Python" page has been changed by TimRadvan.
The comment on this change is: added couchdb-python example.
http://wiki.apache.org/couchdb/Getting_started_with_Python?action=diff&rev1=19&rev2=20

--------------------------------------------------

  }}}
  This first downloads and installs the ''ez_setup.py'' script which runs python ''.egg''
files. The second part downloads the ''.egg'' file for CouchDB and installs it along with
its dependencies.
  
- You can find the documentation [[http://packages.python.org/CouchDB/getting-started.html|here]],
although make sure you use the latest version.
+ You can find the documentation [[http://packages.python.org/CouchDB/getting-started.html|here]],
although make sure you use the latest version. A brief introduction:
+ 
+ {{{
+ import couchdb
+ 
+ couch = couchdb.Server() # Assuming localhost:5984
+ # If your CouchDB server is running elsewhere, set it up like this:
+ couch = couchdb.Server('http://example.com:5984/')
+ 
+ # select database
+ db = couch['mydb']
+ 
+ #create a document and insert it into the db:
+ doc = {'foo': 'bar'}
+ db.save(doc)
+ }}}
  
  === couchquery ===
   . http://mikeal.github.com/couchquery/

Mime
View raw message