Skip to main content

LlamaIndex Readers Integration: Couchbase

pip install llama-index-readers-couchbase

This loader loads documents from Couchbase cluster. The user specifies a Couchbase client or credentials to initialize the reader. They can specify the SQL++ query to fetch the relevant docs.

Usage

Here's an example usage of the CouchbaseReader.

import os

from llama_index.readers.couchbase import CouchbaseReader

connection_string = (
    "couchbase://localhost"  # valid Couchbase connection string
)
db_username = "<valid_database_user_with_read_access_to_bucket_with_data>"
db_password = "<password_for_database_user>"

# query is a valid SQL++ query that is passed to client.query()
query = """
    SELECT h.* FROM `travel-sample`.inventory.hotel h
        WHERE h.country = 'United States'
        LIMIT 5
        """

reader = CouchbaseLoader(
    connection_string=connection_string,
    db_username=db_username,
    db_password=db_password,
)

# It is also possible to pass an initialized Couchbase client to the document loader
# from couchbase.auth import PasswordAuthenticator  # noqa: E402
# from couchbase.cluster import Cluster # noqa: E402
# from couchbase.options import ClusterOptions # noqa: E402

# auth = PasswordAuthenticator(
#    db_username,
#    db_password,
# )

# couchbase_client = Cluster(connection_string, ClusterOptions(auth))
# reader = CouchbaseLoader(client=couchbase_client)

# fields to be written to the document
text_fields = ["name", "title", "address", "reviews"]

# metadata fields to be written to the document's metadata
metadata_fields = (["country", "city"],)

documents = reader.load_data(
    query=query, text_fields=text_fields, metadata_fields=metadata_fields
)

This loader is designed to be used as a way to load data into LlamaIndex. See here for examples.

Usage Data

This product automatically collects usage and performance data (such as product name and version) and browser information (such as IP address) (collectively, "Usage Data"). Couchbase uses Usage Data, along with other data you may provide to Couchbase (such as your user name or email address), to develop and improve our products as well as inform our sales and marketing programs. We do not access or collect any data you store in Couchbase products. We use Usage Data to understand aggregate usage patterns and make our products more useful to you. For more information on how Couchbase collects, protects, and processes information, please refer to the Couchbase Privacy Policy viewable at https://www.couchbase.com/privacy-policy.

Metadata

Release files for llama-index-readers-couchbase 0.7.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 llama-index-readers-couchbase 0.7.0
File Size Uploaded Provenance Actions
llama_index_readers_couchbase-0.7.0.tar.gz 5.2 kB Without provenance Details for llama_index_readers_couchbase-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-readers-couchbase 0.7.0
File Interpreter ABI Platform Actions
llama_index_readers_couchbase-0.7.0-py3-none-any.whl Python 3 none any Details for llama_index_readers_couchbase-0.7.0-py3-none-any.whl

Total release size: 10.4 kB

Release files / llama_index_readers_couchbase-0.7.0.tar.gz

Download URL llama_index_readers_couchbase-0.7.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
085661d685b13d04547ed470d47b6d1ccd6b66b0a28ee94e35d7a5b2f8639acb
BLAKE2b-256 checksum
How to use checksums
0dbf2159db9e953c70359ea71545b190696d20823fae89ce157b574f220b6ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_readers_couchbase-0.7.0-py3-none-any.whl

Download URL llama_index_readers_couchbase-0.7.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20bc340f6d6e737e1ca68dd87f2e40dca32377ff618380c7025cf1412ae3a9ef
BLAKE2b-256 checksum
How to use checksums
cbbc04a3fcc8797fdee4e9bb59da067761040bbbde19cb4a3989e24c2cbead40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-readers-couchbase 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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