Search:

Search all manuals
Search this manual
Manual
Membase and Python Tutorial
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
4 Minimal Examples
Chapter Sections
Chapters

4.1. Quick Save and Retrieve

from couchbase.couchbaseclient import VBucketAwareCouchbaseClient
server = "http://localhost:8091/pools/default"
v = VBucketAwareCouchbaseClient(server,"default","")
setstatus = v.set("key1", 0, 0, "value1")
getstatus = v.get("key1")
print getstatus[2]
v.done()

Replace the value for the server variable to test on your own server. Replace "key1" and "value1" with your own data requests. You are responsible for your own error checking with this ultra minimal example.