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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_readers_couchbase-0.5.1.tar.gz.
File metadata
- Download URL: llama_index_readers_couchbase-0.5.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
768ae06f533bafa60eb6b0deedcf1648ec3907977075e303735fd99376df628f
|
|
| MD5 |
627acbc86ddd1f265b9017adee864350
|
|
| BLAKE2b-256 |
55558d6dcb53511bde3f7eac5472ab1d6d2e34d5598f43795785ecc86a4c5254
|
File details
Details for the file llama_index_readers_couchbase-0.5.1-py3-none-any.whl.
File metadata
- Download URL: llama_index_readers_couchbase-0.5.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db486a20f31d31c7220d5e3d2ec56bb17a20e79edbe1ddf41791096aa0986584
|
|
| MD5 |
9769968a4b7c9904ceef79f0116ed89e
|
|
| BLAKE2b-256 |
c354b8bc5209163e2274210eb0105c48f1c55658fb6db29cbcf498f261624236
|