How to install couchbase
- Download and install ActivePython
- Open Command Prompt
- Type
pypm install couchbase
Lastest release
Client for Couchbase.
Building and Installing
This only applies to building from source. If you are using a Windows installer then everything (other than the server) is already included. See below for windows snapshot releases.
Also note that these instructions apply to building from source. You can always get the latest supported release version from PyPi
Prerequisites
- Couchbase Server (http://couchbase.com/download)
- libcouchbase. version 2.0.5 or greater (Bundled in Windows installer)
- libcouchbase development files.
- Python development files
- A C compiler.
Building
If your libcouchbase install is in an alternate location (for example, /opt/local/libcouchbase), you may add extra directives, like so
Or you can modify the environment CFLAGS and LDFLAGS variables.
Windows Snapshots
A list of recent snapshot builds for Windows may be found here <http://packages.couchbase.com/clients/python/snapshots>.
You can always get release binaries from PyPi (as above).
Using
Here's an example code snippet which sets a key and then reads it
You can also use views
Other Examples
There are other examples in the examples directory.
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
The HTML output can be found in docs/build/html/.
Testing
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:
To run the tests:
nosetests
Support
If you found an issue, please file it in our JIRA. You may also ask in the #libcouchbase IRC channel at freenode. (which is where the author(s) of this module may be found).
License
The Couchbase Python SDK is licensed under the Apache License 2.0.