Skip to main content

Official Python Couchbase Client

Project description

Official Couchbase Python Client

This is the new and improved Couchbase Python SDK. It is still in stages
of development but is making rapid progress. It is based on the common
C-based library [libcouchbase][1].


[libcouchbase][1] version 2.0.5 or greater.


In order to build this client, you need to have `libcouchbase` installed. Once
this is done, you can now build the extension.

python build_ext --inplace

If your libcouchbase install is in an alternate location (for example,
`/opt/local/libcouchbase'), you may add extra directives, like so:

python build_ext --inplace \
--library-dir /opt/local/libcouchbase/lib \
--include-dir /opt/local/libcouchbase/include

Or you can modify the environment `CFLAGS` and `LDFLAGS` variables.

Running sample application

To run the small sample application that inserts one million documents into
a local Couchbase at the default port 8091 and a bucket called "default",
just execute:

python examples/

If you do not with to install the package just yet, remember to set the
`$PYTHONPATH` environment variable so the example scripts can load the

PYTHONPATH=$PWD python examples/

Building documentaion

The documentation is using Sphinx and also needs the numpydoc Sphinx extension.
To build the documentation, go into the `docs` directory and run:

make html

The HTML output can be found in `docs/build/html/`.

Running tests

The tests need a running Couchbase instance. For this, a `tests/tests.ini`
file must be present, containing various connection parameters.
An example of this file may be found in `tests/tests.ini.sample`.
You may copy this file to `tests/tests.ini` and modify the values as needed.

The test suite need several buckets which need to be created before the tests
are run. They will all have the common prefix as specified in the test
configuration file. To create them, run:

python tests/

To run the tests:


Tested platforms

So far the code has been tested on the following platforms/environments.

Linux 64-bit (with GCC):
- Python 2.7.3
- Python 3.2.3
- Python 2.6.6

Mac OS X 10.6.8
- Python 2.6.1
- Python 3.3.1

Microsoft Windows 2008 R2 (MSVC 2008/VC9)
- Python 2.7.3 (x86)
- Python 2.7.4 (x64)

If you ran it on a different platform and it worked, please let me know and
I'll add it to the list.


If you found an issue, please file it in our [JIRA][2]. You may also ask in the
`#libcouchbase` IRC channel at [ IRC servers][3] (which is where
the author(s) of this module may be found).


The Couchbase Python SDK is licensed under the Apache License 2.0.


Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for couchbase, version 0.11
Filename, size File type Python version Upload date Hashes
Filename, size couchbase-0.11.tar.gz (80.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page