Search:

Search all manuals
Search this manual
Manual
Couchbase Client Library: Python 1.0
Community Wiki and Resources
Download Client Library
Python Client Library
SDK Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
1.3 Try it Out!
Chapter Sections
Chapters

1.3.2. Creating a Couchbase Client Instance

To create a Couchbase client instance, the URI of any available node in the cluster is needed, as is a bucket name and password (or cluster credentials).

couchbase = Couchbase("http://192.168.56.2:8091/pools/default", "default", "");

The default Couchbase Server installation creates a bucket named "default" without a password, therefore the third argument is optional when used with this bucket. If you created an authenticated bucket, you should specify those values in place of the default settings above.

The construction of a Couchbase client instance does require some overhead as the cluster topology is discovered, so as a best practice the client should not be created more than once per bucket, per application.