You are viewing the documentation for a prerelease version.

View Latest

Couchbase Python SDK Release Notes and Archives

Release notes, installation instructions, and download archive for the Couchbase Python Client.

These pages cover the Beta release of the Couchbase Python SDK. The API interface is stable, but could change for bug fixes during the Beta process. New features are likely to be added.

Documentation is incomplete, subject to change, and could contain broken links.

Please note the 'pip' comnmands below will install the latest prerelease version. If you wish to install a specific version, use 'pip install couchbase==<version number>' substituting the appropriate version number. You can see the pip command line arguments to install specific versions on the release notes page.

The Couchbase Python SDK 3.0 is a complete rewrite of the API, reducing the number of overloads to present a simplified surface area, and adding support for future Couchbase Server features like Collections and Scopes (available in Couchbase Server 6.5 as a developer preview). The 3.0 Python SDK introduces comprehensive PEP-484 style type annotations.

Requirements

Couchbase Python SDK bundles libcouchbase automatically, so no need to install it separately. You may need cmake to install, although the installer will attempt to download it from PyPI automatically.

The Python SDK 3.0 requires Python 3, with Python 3.5 and above supported. It should work on Python 2.7, but is not officially supported.

Installing on Linux

Debian and Ubuntu
# Only needed during first-time setup:
sudo apt-get install git-all python3-dev python3-pip python3-setuptools cmake build-essential
sudo pip3 install --pre couchbase
RHEL and CentOS
# Only needed during first-time setup:
sudo yum install gcc gcc-c++ python-devel python-pip cmake
sudo pip install --pre couchbase
RHEL/CentOS distributions may not provide the python-pip package in the base repositories. It may be found in the EPEL repository.

Installation on Mac OS X

To install the library on Mac OS X, first install the de-facto package manager for OS X: Homebrew. Once Homebrew is configured:

brew update # get list of latest packages
brew install python
pip install --pre couchbase
The above example uses the Python supplied by Homebrew and not the vendor-supplied Python which ships with OS X. The Python SDK will still work with the vendor-supplied Python (though pip install may be a privileged command), but it is recommended to use Homebrew’s Python instead.

Installing on Microsoft Windows

pip install --pre couchbase

Hello Couchbase

The code snippet below shows how the Python SDK may be used for some common operations.

from couchbase.cluster import Cluster, ClusterOptions
from couchbase_core.cluster import PasswordAuthenticator

cluster = Cluster('couchbase://localhost', ClusterOptions(PasswordAuthenticator('username', 'password')))
cb = cluster.bucket('bucket-name')
cb_coll = cb.default_collection()
cb_coll.upsert('u:king_arthur',
               {'name': 'Arthur', 'email': 'kingarthur@couchbase.com', 'interests': ['Holy Grail', 'African Swallows']})
# OperationResult<RC=0x0, Key=u'u:king_arthur', CAS=0xb1da029b0000>

print(cb_coll.get('u:king_arthur').content_as[str])
# {u'interests': [u'Holy Grail', u'African Swallows'], u'name': u'Arthur', u'email': u'kingarthur@couchbase.com'}

## The CREATE PRIMARY INDEX step is only needed the first time you run this script
cluster.query('CREATE PRIMARY INDEX ON bucket-name')

from couchbase.cluster import QueryOptions
row_iter = cluster.query('SELECT name FROM bucket-name WHERE $1 IN interests', QueryOptions(positional_parameters=['African Swallows']))
for row in row_iter: print(row)
# {u'name': u'Arthur'}

Connecting

To connect to a Couchbase bucket, you must use Couchbase Role-Based Access Control (RBAC). This is fully described in the section Authorization. An authenticator, containing username and password, should be defined, and then passed to the cluster. Following successful authentication, the bucket can be opened:

from couchbase.cluster import Cluster, ClusterOptions
from couchbase_core.cluster import PasswordAuthenticator
cluster = Cluster('couchbase://localhost', ClusterOptions(PasswordAuthenticator('username', 'password')))
bucket = cluster.bucket('bucket-name')
coll = bucket.default_collection()

Once defined, the authenticator can be passed to other clusters, as appropriate.

See Managing Connections for more connection options and details about the connection string.

Document Operations

Document operations, such as storing and retrieving documents, can be done using simple methods on the Bucket class such as Bucket.get and Bucket.upsert. Simply pass the key (and value, if applicable) to the relevant methods.

rv = coll.get('document-id')
print(rv.content)
coll.upsert('document-id', {'application': 'data'})

N1QL Queries

Couchbase N1QL queries are performed by running the Cluster.query method.

from couchbase.cluster import QueryOptions

query_result = cluster.query("""SELECT airportname, city, country FROM `travel-sample` """
                             """WHERE type="airport" AND city=$my_city""",
                             QueryOptions(named_parameters={'my_city': "Reno"}))
for row in query_result:
    print(row)

Additional Resources

Older API references are linked from their respective sections in the Release Notes. Most of the API documentation can also be accessed via pydoc.

project-docsmigrating-sdk-code-to-3.n.adoc highlights the main differences to be aware of when migrating your code.

Couchbase welcomes community contributions to the Python SDK. The Python SDK source code is available on GitHub.

Information on new features, fixes, known issues as well as information on how to install older release versions is in the release notes.

PyPy support

Because the Python SDK is written primarily in C using the CPython API, the official SDK will not work on PyPy.

Please let us know if you require a PyPy-compatible version of the SDK.

Installation

You may install previous versions of the SDK using pip (after installing the required dependencies)

pip install git+https://github.com/couchbase/couchbase-python-client@VERSION

where VERSION is the version you wish to install. For example, to install version 2.0.8:

pip install git+http://github.com/couchbase/couchbase-python-client@2.0.8

Installing on Linux

Debian and Ubuntu
# Only needed during first-time setup:
sudo apt-get install git-all python3-dev python3-pip python3-setuptools cmake build-essential
sudo pip3 install --pre couchbase
RHEL and CentOS
# Only needed during first-time setup:
sudo yum install gcc gcc-c++ python-devel python-pip cmake
sudo pip install --pre couchbase
RHEL/CentOS distributions may not provide the python-pip package in the base repositories. It may be found in the EPEL repository.

Installation on Mac OS X

To install the library on Mac OS X, first install the de-facto package manager for OS X: Homebrew. Once Homebrew is configured:

brew update # get list of latest packages
brew install python
pip install --pre couchbase
The above example uses the Python supplied by Homebrew and not the vendor-supplied Python which ships with OS X. The Python SDK will still work with the vendor-supplied Python (though pip install may be a privileged command), but it is recommended to use Homebrew’s Python instead.

Installing on Microsoft Windows

pip install --pre couchbase

Upgrading to 3.x

Python SDK 3.0.0 automatically bundles libcouchbase (downloading and building it if necessary), so no need to install it separately.

Python SDK 3.0.0 Beta 3 Release Notes (January 20 2020)

pip install couchbase==3.0.0b3

Enhancements

  • PYCBC-766: Bumped LCB requirement to 3.0.0.

  • PYCBC-757: Refactored for FTS/N1QL/durability LCB changes.

  • PYCBC-758: Reflected renaming of lcb_wait3 to lcb_wait in LCB.

  • PYCBC-765: Expose Collection properties and Datastructures in Sphinx docs.

  • PYCBC-610: FTS Index Management for SDK3.

  • PYCBC-750: Add Search Index manager for SDK3.

Fixes

  • PYCBC-760 Fixed Collection.exists implementation.

  • PYCBC-640 Implemented replica reads according to RFC.

  • PYCBC-768: Refactored durability params to prevent impossible combinations.

  • PYCBC-639: Example N1QL statements do seem to work in "Hello Couchbase" example.

  • PYCBC-667: Fixed Upsert Group fails with 'roles: value must be supplied'.

  • PYCBC-674: Fixed deprecation warnings from sdk2 when running sdk3.

  • PYCBC-675: Brough Result objects in line with RFC, removed unidiomatic interfaces.

  • PYCBC-694: Completed query implementation.

  • PYCBC-753: Collection APIs marked volatile.

  • PYCBC-763: Corrected MutateInResult.content_as implementation.

  • PYCBC-764: Delete or renamed remaining SDK2 references in main API: Renamed SDK2/sdk2 to Core/core where applicable. Removed classes & methods inapplicable to SDK3.

  • PYCBC-704: Implemented *CollectionOptions for Collection management API.

  • PYCBC-716: Tests should no longer try to do 6.5-specific tests against a 6.0 server.

  • PYCBC-686: Applyed new naming convention for interfaces/protocols.

  • PYCBC-687: Support added for Python 3.8.

  • PYCBC-761: Added timeout to lookup_in operation.

Python SDK 3.0.0 Beta 2 Release Notes (December 30 2019)

pip install couchbase==3.0.0b2

Enhancements

  • PYCBC-680: UpsertOptions should use 'expiry' rather than 'expiration'.

  • PYCBC-692: Implement Collection.exists

  • PYCBC-693: Fix UpsertOptions constructor

  • PYCBC-697: Migrate to timedelta/datetime from FiniteDuration/Seconds etc

  • PYCBC-709: Convert from lcb_strerror to lcb_strerror_short

  • PYCBC-717: Tighten up lookup test with nonexistent path

  • PYCBC-721: Implement collection.drop_collection and drop_scope

  • PYCBC-647: Support View design documents for SDK3

  • PYCBC-725: Adjust to latest error name refactorings in LCB3

  • PYCBC-631: Add query service fast prepare support

  • PYCBC-646: View management

  • PYCBC-666: Add timeouts to management/get/store calls

  • PYCBC-678: Update sphinx-autodoc-typehints to attempt to use type comments

  • PYCBC-679: Get rid of obsolete coll/scope injection calls

  • PYCBC-683: N1QL Query Index Management

  • PYCBC-718: Refactor error handling for libcouchbase 3.0.0 Beta 2

  • PYCBC-720: Parameterise patch type for libcouchbase

  • PYCBC-728: Make CouchbaseError.Params constructor type-safe

Fixes

  • PYCBC-699: Operate on non-default collection again

  • PYCBC-705: Fix segfault in test_importworks

  • PYCBC-708: Several similar admin test failures

  • PYCBC-712: Don’t test collections on older servers

  • PYCBC-715: Fix cluster arguments for analytics operations

  • PYCBC-727: Analytics test fixes

  • PYCBC-690: Set up Combination Testing for SDK 3 - Python 3.x Win and Linux

  • PYCBC-700: Fix Python 2/3 compatibility issues

  • PYCBC-724: Fix PYCBC git tag detection code for x.y.z where z>9

Python SDK 3.0.0 Beta 1 Release Notes (October 11 2019)

pip install couchbase==3.0.0b1

Enhancements

  • PYCBC-637: Added static Cluster.connect factory method.

  • PYCBC-630: Added Datastructures v2 for SDK3.

  • PYCBC-660: Renamed lcb_cmdfts_query to lcb_cmdfts_payload.

  • PYCBC-661: Safeguards added for property access when debugging partially constructed Client instances.

  • PYCBC-664: Added create bucket management API

  • PYCBC-665: Added create user management API

Python SDK 3.0.0 Alpha 6 Release Notes (September 27 2019)

pip install couchbase==3.0.0a6

Enhancements

  • PYCBC-638: scope and collection methods now marked as "uncommitted".

  • PYCBC-584: fulldoc insert with subdoc upsert now supported with LCB V4 API.

  • PYCBC-644: Updates to reflect C code changes for logging, subdocs, LCB_STORE_**, lcb_*3, and enable_mutation_tokens refactorings.

  • PYCBC-645: Changes made to handle new safety checks in LCB for bad hostname.

  • PYCBC-652: Refactored for new lcb_createopts_** API.

  • PYCBC-654: Refactored for temporary removal of observe/endure/mctx code from LCB3 for client-side durability changes.

  • PYCBC-657: Refactored for libcouchbase 3.0.0 Beta 1.

Python SDK 3.0.0 Alpha 5 Release Notes (August 23 2019)

pip install couchbase==3.0.0a5

Enhancements

  • PYCBC-616: Migrate acouchbase module to SDK3

  • PYCBC-621: Update Cluster constructor docs to indicate mandatory authenticator

  • PYCBC-623: Document Git dependency

  • PYCBC-624: Update Hello World example to indicate mandatory authenticator argument

  • PYCBC-625: Make multi-ops explicitly visible in Collection class

  • PYCBC-627: Fix eager_resources setting, fix 2.7 numpydoc incompatibility

  • PYCBC-570: Python: Author docs for SubDocument LookupIn

  • PYCBC-603: Python: SubDoc mutateIn Docs authoring

  • PYCBC-626: Add durability to subdoc, touch and counter operations

  • PYCBC-606: Synchronous Replication snippets

  • PYCBC-633: Rename KV-style Bucket classes to Client for SDK3 code

Python SDK 3.0.0 Alpha 4 Release Notes (July 12 2019)

pip install couchbase==3.0.0a4

Enhancements

Fixes

  • PYCBC-607: Ensure couchbase_core is bootstrapped.

  • PYCBC-609: Fix RPATH install for distutils.

Python SDK 3.0.0 Alpha 3 Release Notes (July 5 2019)

pip install couchbase==3.0.0a3

Enhancements

  • PYCBC-585: Refined collections support for SDK3.

  • PYCBC-589: Migrated datastructures to SDK3.

  • PYCBC-595: Implemented multi-ops in Collection class.

  • PYCBC-596: Centralised Collections/Bucket functionality, giving 'legacy style' behavior within the context of a Collection.

  • PYCBC-597: Added buckets_list function to documentation index.

  • PYCBC-601: Use correct RPATH when using legacy build option (distutils).

Python SDK 3.0.0 Alpha 2 Release Notes (June 18 2019)

pip install couchbase==3.0.0a2

Fixes

  • PYCBC-592: Fixed manifest to include extra files for distribution.

  • PYCBC-593: Restrict LCB versions to tagged >=2.10.3, >=3.0.0-alpha.3.

Python SDK 3.0.0 Alpha 1 Release Notes (June 14 2019)

pip install couchbase==3.0.0a1

Enhancements

  • PYCBC-540: Added Basic CRUD for SDK 3.0.

  • PYCBC-541: Added Basic Query for SDK 3.0.

  • PYCBC-564: Added Synchronous Durability Operations.

  • PYCBC-566: KV Operations Doc at draft level.

  • PYCBC-583: Python Doc on Error Handling for SDK 3 (v1).

  • PYCBC-546: Update CMakeLists.txt to pull in libcouchbase and other deps.

  • PYCBC-561: Update Error Handling for SDK3 Python.

  • PYCBC-562: Move to libcouchbase 3.0.0 and LCB API v4.

  • PYCBC-582: Made touch tests more reliable.

  • PYCBC-588: Fixed Centos compilation.

Upgrading 2.x

Versions of the Python SDK prior to 3.0.0 do not bundle libcouchbase. Be sure to upgrade your LCB installation before making a major upgrade to the Couchbase Python client.

Python SDK 2.5.4 Release Notes (February 5 2019)

pip install couchbase==2.5.4

Enhancements

  • PYCBC-558: Better document libcouchbase dependency. The minimum version number is retrieved from a centralised location.

Python SDK 2.5.3 Release Notes (January 8 2019)

pip install couchbase==2.5.3

Enhancements

  • PYCBC-520: Installation will now check which version of LCB is installed. If it’s not sufficient for the Python Client version, an error message will suggest which minimum version needs installing.

Python SDK 2.5.2 Release Notes (December 4 2018)

pip install couchbase==2.5.2

Enhancements

  • PYCBC-547: Allow the user to set deferred query timeout easily

Fixes

  • PYCBC-542: Correct the "plain text" example in n1ql_query API documentation

  • PYCBC-543: Handle multiresult exception entries without a success field

  • PYCBC-550: Correct the txcouchbase get_multi example

  • PYCBC-554: Mandate installation of PEP484 typing module on all systems

  • PYCBC-548: Fix AnalyticsIngester docs

Python SDK 2.5.1 Release Notes (November 6 2018)

pip install couchbase==2.5.1

Please note, with the end of support for Microsoft Visual Studio 2008 (VC9), which is required to build binary extensions for Python 2.7 on Windows, with this release we no longer build for Python 2.7 on Windows.

However, we are now shipping binary wheels for Python 3 on Windows, which means that you can now download Windows binaries (if available for your Python 3 version) simply by running the pip command above, rather than manually downloading the binaries or sources.

Enhancements

  • PYCBC-531: Analytics KV Ingress for Python

  • PYCBC-532: Analytics Deferred Queries for Python

  • PYCBC-493: Add alternate name/alternate port config support

  • PYCBC-515: Reject unsupported Python versions in setup.py

  • PYCBC-535: Support Python 3.7 Async Interface

Python SDK 2.5.0 Release Notes (October 2 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.5.0

Enhancements

  • PYCBC-523: add parameterized query support for analytics

  • PYCBC-524: Update Analytics support for beta

  • PYCBC-526: Add N1QL query metrics option and server results

Fixes

  • PYCBC-528: Handle keyless exceptions in multiresult

Python SDK 2.4.2 Release Notes (September 7 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.2

Enhancements

Fixes

  • PYCBC-522 - Fix remaining lost spans

  • PYCBC-525 - Remove libxml2-python3 from dev_requirements.txt

Python SDK 2.4.1 Release Notes (August 17 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.1

Due to a known issue [PYCBC-522]: In this release, Response Time Observability and tracing are available, but off by default due to tracing contexts being lost in some instances.

This may be enabled with "enable_tracing=true" on the connection string, and is likely suitable for most applications. Once resolved, it will be enabled by default in a future 2.4 release.

Enhancements

  • PYCBC-504 - In python 3.7 'async' is a keyword. The package 'couchbase.async' have to be renamed

Fixes

  • PYCBC-499 - Admin user_upsert with external type results in error due to password field being sent

  • PYCBC-507 - overhead too high with tracing enabled

Python SDK 2.4.0 Release Notes (July 4 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.0

Due to a known issue [PYCBC-507]: In this release, Response Time Observability and tracing are available, but off by default owing to an unacceptable level of overhead in the SDK and libcouchbase.

This may be enabled with "enable_tracing=true" on the connection string,and is likely suitable for most applications.  Once resolved, it will be enabled by default in a future 2.4 release.

Enhancements

  • PYCBC-439 - Support FTS queries in Async wrappers

  • PYCBC-500 - Use common error and exceptions with FLE

  • PYCBC-503 - Update Travis APT source to use up-to-date libcouchbase

  • PYCBC-482 - add tracing context to timeout response

Fixes

  • PYCBC-485 - missing threshold logging tracer output with simple test

  • PYCBC-487 - No support for CertAuthenticator

  • PYCBC-488 - Cert auth does not raise mixed mode errors with cert and auth

  • PYCBC-489 - Cert auth and open bucket with password do not raise error

  • PYCBC-496 - cluster_manager() method causes a crash

  • PYCBC-506 - Disable tracing unless specified in connection string

  • PYCBC-502 - Fix ImportError in preliminary analytics support

  • PYCBC-508 - Fix Windows compilation problems

  • PYCBC-509 - Support official 'desc' keyword for FTS Sort

Python SDK 2.4.0-beta2 Release Notes (June 5 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.0-beta2

Enhancements

  • PYCBC-481 - Field encryption packaging/distribution change

  • PYCBC-486 - Document Threshold Logger parameters

  • PYCBC-490 - Interpolate printf-style logging input to logging function using vsnprintf

  • PYCBC-492 - Update Travis configuration to reflect supported platforms

  • PYCBC-494 - Support get_key_id method for Crypto V1

Fixes

  • PYCBC-491 - Crash when only Threshold Tracer is enabled, not parent tracer

Python SDK 2.4.0-beta Release Notes (May 16 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.0-beta

Enhancements

  • PYCBC-452 - Implement Log Redaction

  • PYCBC-465 - Add Snappy Compression Feature

  • PYCBC-468 - Add encrypted field support to Python SDK

  • PYCBC-469 - Field Encryption, Asymmetric Key Support

  • PYCBC-474 - Add Profile N1QL Query Parameter

  • PYCBC-464 - Tracing Server Duration, Zombie Responses

Python SDK 2.3.5 Release Notes (May 1 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.5

Fixes

  • PYCBC-477 - PrefixQuery causes error with unicode characters

  • PYCBC-472 - Evaluate/merge "TypeError: _assign_kwargs() got an unexpected keyword argument ' PR

Python SDK 2.4.0a2 Release Notes (April 13 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.0-dp2

This is an Alpha developer preview of operation duration observability (also known as tracing).

You will need to follow the instructions here on GitHub to install this feature:

Enhancements

Python SDK 2.4.0a1 Release Notes (February 26 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.4.0a1

This is an Alpha developer preview of log redaction and compression.

Enhancements

Python SDK 2.3.4 Release Notes (February 14 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.4

Enhancements

  • PYCBC-451 - Python SDK Documentation could use example of upsert involving JSON text

Fixes

  • PYCBC-455 - Test/fix compilation on MacOS High Sierra

  • PYCBC-458 - Clang and Python warnings during installation of Python SDK 2.3.2

  • PYCBC-463 - TXIoEvent errors out application upon connection loss

Python SDK 2.3.3 Release Notes (January 12 2018)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.3

Enhancements

  • PYCBC-412 - add health check function into lcb check

  • PYCBC-453 - Implement Certificate Authentication

  • PYCBC-451 - Python SDK Documentation could use example of upsert involving JSON text

Python SDK 2.3.2 Release Notes (December 7 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.2

Enhancements

  • PYCBC-445 - Implement/test support for KV with homogenous IPv6

Fixes

  • PYCBC-450 - N1QL Consistency documentation say default is 'none' should be 'not_bounded'

Python SDK 2.3.1 Release Notes (November 8 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.1

Enhancements

  • PYCBC-419 - Fast fail View queries for Ephemeral buckets

  • PYCBC-412 - add health check function into lcb check

Python SDK 2.3.0 Release Notes (October 25 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.3.0

Enhancements

  • PYCBC-442 - Update required version of libcouchbase in Prerequisites

  • PYCBC-397 - SDK Enhanced Error Messages

  • PYCBC-420 - Expose more N1QL Query Options

  • PYCBC-424 - Rename subdoc create / upsert flags to match RFC

  • PYCBC-428 - Update README with details on how to authenticate with CB server 5.0

  • PYCBC-433 - Add Cluster.Authenticate('username', 'password') shortcut

Fixes

  • PYCBC-434 - Fix bad host test

  • PYCBC-435 - get_fulldoc and upsert_fulldoc should not be in subdoc API

  • PYCBC-436 - Should not encode forward slash '/' in connection string query string parameters

Python SDK 2.2.6 Release Notes (August 25 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.5
  • Add Couchbase 5.0 User Management API

  • Update ClusterManager to be compatible with Couchbase 5.0

  • Fix bug where cluster.open_manager() would only work on localhost

  • Fix bug where duplicate N1QL queries were submitted

Python SDK 2.2.5 Release Notes (June 6 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.5

This version has a known defect which may result in duplicate N1QL statements being sent. This may cause unwanted mutations or spurious errors when using the N1QL UPDATE or INSERT statements. You may work around this by either stricter criteria for update, for example WHERE meta().cas = xyz. The issue affects versions 2.2.3-2.2.5 (inclusive) and will be fixed in version 2.2.6

  • Couchbase 5.0 Subdocument additions including:

    • Full-doc get/set for use with xattrs

    • get_count to get number of items/elements within dictionary/array

    • insert_doc/create_doc option for mutate_in

  • Fix bug where connection string options were not passed when using Cluster interface

  • Fix bug where GEvent timer was not calling base class initializer

Python SDK 2.2.4 Release Notes (May 2 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.4

This version has a known defect which may result in duplicate N1QL statements being sent. This may cause unwanted mutations or spurious errors when using the N1QL UPDATE or INSERT statements. You may work around this by either stricter criteria for update, for example WHERE meta().cas = xyz. The issue affects versions 2.2.3-2.2.5 (inclusive) and will be fixed in version 2.2.6

  • Add new FTS query types. This adds GeoDistanceQuery, GeoBoundingBoxQuery, and TermRangeQuery types.

  • Add new advanced FTS sorting options. You can now use couchbase.fulltext.Sort* classes in addition to a list of sort fields for couchbase.fulltext.Params.sort

  • Fixed memory leak when using the Item API. This leak would be triggered if passing an Item with an existing value to a get() call. In those cases, the prior value would leak memory and never have its reference count decremented.

  • Add new user management functionality in the cluster manager (Bucket.cluster_manager()). These functions have the user_* prefix and allow retrieval and modification of built-in Couchbase users.

Python SDK 2.2.3 Release Notes (April 4 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.3

This version has a known defect which may result in duplicate N1QL statements being sent. This may cause unwanted mutations or spurious errors when using the N1QL UPDATE or INSERT statements. You may work around this by either stricter criteria for update, for example WHERE meta().cas = xyz. The issue affects versions 2.2.3-2.2.5 (inclusive) and will be fixed in version 2.2.6.

  • Add experimental Couchbase Analytics support. This offers an interface very similar to N1QL. You can issue a query using the Bucket._analytics_query() method. Requires libcouchbase >= 2.7.3

  • Add Authenticator and Cluster interface, for parity with other SDKs. See the couchbase.cluster module for more information.

Python SDK 2.2.2 Release Notes (March 7 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.2
  • Fix typo in Bucket.queue_size() method which caused it to fail.

Python SDK 2.2.1 Release Notes (February 7 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.1
  • Provide some better convenience functionality for SubdocResult

  • Add experimental Xattr support (Requires libcouchbase >= 2.7.0)

Python SDK 2.2.0 Release Notes (January 3 2017)

pip install git+http://github.com/couchbase/couchbase-python-client@2.2.0
  • Update the FTS (couchbase.fulltext) API to support the sort parameter. (couchbase.fulltext.Params.sort)

  • Rename fulltext.StringQuery to QueryStringQuery

  • Don’t crash in debuggers when an exception is thrown. This would previously assume (assert in C) that the current exception’s reference count is fixed at 1 when rethrowing. This isn’t valid in debuggers which may intercept exception and their frames beforehand.

  • Remove 'experimental' designation from data structure API.

Python SDK 2.1.3 Release Notes (December 6 2016)

pip install git+http://github.com/couchbase/couchbase-python-client@2.1.3
  • [PYCBC-366]: Fix crash on get_multi and Item API. If specific options were passed via ItemOptionsDict, it would crash the interpreter.

  • Don’t assume FTS search parameters use ASCII encoding. This fixes an encoding issue where certain unicode characters caused an exception when found in a search term.

  • Fix bug in FTS where invalid arguments to the Python API (e.g. search()) would cause the current exception state to be clobbered, resulting in a confused interpreter and an even more confusing error.

  • Rename data structure API names to be in conformity with SDK-RFC.

Python SDK 2.1.2 Release Notes (November 1 2016)

pip install git+http://github.com/couchbase/couchbase-python-client@2.1.2
  • Make N1QL scan consistency constants more similar to the ones used on the server. You may now use couchbase.n1ql.REQUEST_PLUS, couchbase.n1ql.STATEMENT_PLUS in addition to couchbase.n1ql.CONISTENCY_REQUEST

  • Allow cross-bucket ('cluster-level') queries. You can now query across multiple protected buckets by doing the following:

    • Bucket.add_bucket_creds(bucket_name, bucket_password) for each password protected bucket you wish to access. This only needs to be done once.

    • For each query (couchbase.n1ql.N1QLQuery) you can set the cross_bucket=True property.

  • The design_list method has been added to the BucketManager (i.e. couchbase.bucket.bucket_manager()) class. You can now list all design documents belonging to a bucket.

Python SDK 2.1.1 Release Notes (September 30 2016)

pip install git+http://github.com/couchbase/couchbase-python-client@2.1.1

Python SDK 2.1.0 Release Notes (June 21 2016)

pip install git+http://github.com/couchbase/couchbase-python-client@2.1.0
  • Fix exception on SubdocResult.access_ok. This would previously result in an exception due to a typo when referencing a library constant

  • Fix bug in index management when specifying non-primary indexes. Previously the fields in the indexes would be ignored or wrongly encoded when sent to the server. This fix goes in conjunction with fixes in the C SDK 2.6.1