Welcome to the Couchbase Python SDK documentation!

Guide

Using the Python SDK

Installing the SDK and connecting to a cluster.

Migration

The import paths kept for existing code and what replaces each, and moving from 3.x to 4.x.

Logging and Telemetry

Logging, the reports of slow operations and latencies, and sending traces and metrics to OpenTelemetry.

Transactions

Running a transaction, handling its errors, and configuring it.

Parallelism

Sharing a cluster across threads, and using the SDK from more than one process.

Environment Variables

The variables the SDK reads at run time, for logging, option validation and loading OpenSSL.

Reference

The SDK has three APIs that share one set of types. Each API section documents the classes it writes itself; the types they all take and return are documented once, in the common reference.

Synchronous API

The couchbase package, where every operation blocks until it completes.

asyncio API

The acouchbase package, for asyncio.

Twisted API

The txcouchbase package, for Twisted.

Common reference

Options, results, exceptions and the other types every API shares.

Indices and tables