skillfed

couchbase

Python Client for Couchbase

couchbase v4.6.2 859.8K downloads/30d#4,876 on PyPI248
Permissive license Apache License 2.0 Active released

What it is and what it does

The Couchbase Python client is an official SDK for connecting Python applications to Couchbase Server, a distributed NoSQL database. It provides APIs for key-value operations, N1QL queries, full-text search, and analytics, with support for both synchronous and asynchronous patterns. The library is built on top of libcouchbase and requires a C++17 compiler and OpenSSL for compilation from source, though prebuilt wheels are available for Python 3.10, 3.11, and 3.12 on Windows, macOS, and Linux.

The package has been in active development since its first release and is currently in production-stable status. It depends only on typing-extensions for runtime and is actively maintained, with the latest release 57 days old. The library supports Python 3.7 and later, though wheels are provided for more recent versions. Installation typically requires system-level dependencies (compiler, CMake, OpenSSL) unless a prebuilt wheel is available for your platform.

Use it for:

  • Building web applications that need fast document storage and retrieval with Couchbase as the backend database.
  • Running N1QL queries against Couchbase clusters to aggregate or filter document data from Python code.
  • Implementing real-time analytics pipelines that read from and write to Couchbase Server.
  • Developing microservices that require distributed key-value caching and persistence.
  • Migrating from other NoSQL databases to Couchbase while maintaining Python compatibility.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for connecting to and querying Couchbase Server, a NoSQL database, with support for key-value operations, queries, and document management.

Yes, with conditions. Install if you are already committed to Couchbase Server as your database and need a stable, officially-supported Python client. The permissive Apache License 2.0 and active maintenance are strong positives. However, be aware of one known vulnerability (PYSEC-2023-235) that needs verification for this release, and plan for medium install friction on platforms without prebuilt wheels. Not suitable if you need to avoid compiled C++ dependencies or are evaluating database options.

Install

couchbase on PyPI

pip

pip install couchbase

uv

uv add couchbase

poetry

poetry add couchbase

Installing couchbase

Before you install

Medium install friction due to compiled C++ dependencies (requires C++17 compiler support and OpenSSL). Prebuilt wheels available for Python 3.10, 3.11, 3.12 on Windows, macOS, and Linux, reducing friction on common platforms. Active maintenance with recent releases.

License in practice

Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions. No copyleft obligations.

Quickstart

pip install couchbase

from couchbase.cluster import Cluster
from couchbase.auth import PasswordAuthenticator

cluster = Cluster('couchbase://localhost', PasswordAuthenticator('user', 'password'))
bucket = cluster.bucket('bucket_name')
collection = bucket.default_collection()
result = collection.get('document_id')

Requires a running Couchbase Server instance. On source builds, requires C++17 compiler, CMake >= 3.18, OpenSSL development files, and Python development headers.

Verify before relying

  • Whether PYSEC-2023-235 affects the current 4.6.2 release or has been patched
  • Specific performance characteristics or throughput limits under typical workloads
  • Full feature parity between 4.x and older 3.x versions beyond stated compatibility

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 57 days since the last release
Last repo commit
First released
Downloads 859,822/month — #4,876 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities 1 — PYSEC-2023-235

Evidence: couchbase-4.6.2-cp310-cp310-macosx_10_15_x86_64.whl; couchbase-4.6.2-cp310-cp310-macosx_11_0_arm64.whl; couchbase-4.6.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; couchbase-4.6.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; couchbase-4.6.2-cp310-cp310-musllinux_1_2_x86_64.whl; couchbase-4.6.2-cp310-cp310-win_amd64.whl; couchbase-4.6.2-cp311-cp311-macosx_10_15_x86_64.whl; couchbase-4.6.2-cp311-cp311-macosx_11_0_arm64.whl; couchbase-4.6.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; couchbase-4.6.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; couchbase-4.6.2-cp311-cp311-musllinux_1_2_x86_64.whl; couchbase-4.6.2-cp311-cp311-win_amd64.whl; couchbase-4.6.2-cp312-cp312-macosx_10_15_x86_64.whl; couchbase-4.6.2-cp312-cp312-macosx_11_0_arm64.whl; couchbase-4.6.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; couchbase-4.6.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; couchbase-4.6.2-cp312-cp312-musllinux_1_2_x86_64.whl; couchbase-4.6.2-cp312-cp312-win_amd64.whl; couchbase-4.6.2-cp313-cp313-macosx_10_15_x86_64.whl; couchbase-4.6.2-cp313-cp313-macosx_11_0_arm64.whl

Keywords: couchbase, nosql, pycouchbase, libcouchbase

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: DatabaseTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

couchbase python clientnosql database driverkey-value store pythoncouchbase sdkdocument database clientcouchbase server connector
nosqlcouchbasedatabase-driver

More Libraries packages