You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2011/01/17 12:10:42 UTC

[Couchdb Wiki] Trivial Update of "Getting_started_with_Python" by TimRadvan

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/