Skip to main content

couchbase-connect-py

Python helper for connecting to Couchbase Server or Capella through a unified interface, with cluster creation and bucket/scope/collection/index automation.

Install

pip install .

Quick start

from couchbase_connect import CouchbaseConfig, resolve

# Couchbase Server
config = (
    CouchbaseConfig()
    .host("127.0.0.1")
    .with_username("Administrator")
    .with_password("password")
    .ssl(False)
    .bucket("demo")
)
db = resolve(config)
db.connect(config)
db.create_bucket("demo", quota=128, replicas=0)
db.create_primary_index()
db.disconnect()

# Capella (when capella.token is set)
capella = (
    CouchbaseConfig()
    .token("...")
    .project("my-project")
    .database("my-cluster")
    .user_email("user@example.com")
    .with_username("dbuser")
    .with_password("dbpass")
)
db = resolve(capella)
db.connect(capella)

Context manager

from couchbase_connect import CouchbaseConfig, open_connection

with open_connection(config) as db:
    db.upsert("doc-1", {"hello": "world"})

Tests

# Unit tests
pytest -m "not server and not capella"

# Couchbase Server integration (Docker / testcontainers)
pytest -m server

# Capella integration (copy example property files under tests/resources/)
cp tests/resources/test.capella.2.properties.example tests/resources/test.capella.2.properties
# edit credentials, then:
pytest -m capella

Metadata

Release files for couchbase-connect-py 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for couchbase-connect-py 0.6.0
File Size Uploaded
couchbase_connect_py-0.6.0.tar.gz 183.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for couchbase-connect-py 0.6.0
File Interpreter ABI Platform
couchbase_connect_py-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 249.2 kB

Release files / couchbase_connect_py-0.6.0.tar.gz

Download URL couchbase_connect_py-0.6.0.tar.gz
Size 183.4 kB
Tags Source
SHA-256 checksum
How to use checksums
07d9cea124338b2d77a1e272911cee679f543fd3b9a213b2e4dadfe8ee47b787
BLAKE2b-256 checksum
How to use checksums
993e3b7ce6eaa0e0060be0fd0c7e9ecd296daf6346f981fc88c2926e3167477f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.17.1 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.6.2"},"implementation":{"name":"CPython","version":"3.12.10"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.16 11 Feb 2025","python":"3.12.10","system":{"name":"Darwin","release":"25.6.0"}} HTTPX2/2.7.0

Release files / couchbase_connect_py-0.6.0-py3-none-any.whl

Download URL couchbase_connect_py-0.6.0-py3-none-any.whl
Size 65.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9be4dde165b3f27eb37b892d55ba158f6c14affa38a1852151ce66a6927199b7
BLAKE2b-256 checksum
How to use checksums
d398b85f3171a346e591ba575844383e04ba0ac61351cd681135869228bc57f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.17.1 {"ci":null,"cpu":"arm64","distro":{"name":"macOS","version":"26.6.2"},"implementation":{"name":"CPython","version":"3.12.10"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.0.16 11 Feb 2025","python":"3.12.10","system":{"name":"Darwin","release":"25.6.0"}} HTTPX2/2.7.0

Release history Release notifications | RSS feed

0.8.0

2 release files

0.7.0

2 release files

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page