Skip to main content

Astra DB Loader

pip install llama-index-readers-astra-db

The Astra DB Loader returns a set of documents retrieved from Astra DB. The user initializes the loader with an Astra DB index. They then pass in a vector.

Usage

Here's an example usage of the AstraDBReader.

from openai import OpenAI


# Get the credentials for Astra DB
api_endpoint = "https://324<...>f1c.astra.datastax.com"
token = "AstraCS:<...>"

# EXAMPLE: OpenAI embeddings
client = OpenAI(api_key="sk-<...>")

# Call OpenAI (or generate embeddings another way)
response = client.embeddings.create(
    input="Your text string goes here", model="text-embedding-ada-002"
)

# Get the embedding
query_vector = response.data[0].embedding

# Initialize the Reader object
from llama_index.readers.astra_db import AstraDBReader

# Your Astra DB Account will provide you with the endpoint URL and Token
reader = AstraDBReader(
    collection_name="astra_v_table",
    token=token,
    api_endpoint=api_endpoint,
    embedding_dimension=len(query_vector),
)

# Fetch data from the reader
documents = reader.load_data(vector=query_vector, limit=5)

This loader is designed to be used as a way to load data into LlamaIndex.

Note: Please see the AstraDB documentation here.

Metadata

Release files for llama-index-readers-astra-db 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-astra-db 0.7.0
File Size Uploaded Provenance Actions
llama_index_readers_astra_db-0.7.0.tar.gz 4.4 kB Without provenance Details for llama_index_readers_astra_db-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.6 kB

Release files / llama_index_readers_astra_db-0.7.0.tar.gz

Download URL llama_index_readers_astra_db-0.7.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
70901aa0e8daa75033121a7d70412741a70a7d94ea0c941d4a77661e63f6c596
BLAKE2b-256 checksum
How to use checksums
ef43bf1a86a0d0938246cd2890c312a41d34778c21bc4637079529e4c263e657
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_astra_db-0.7.0-py3-none-any.whl

Download URL llama_index_readers_astra_db-0.7.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16f3fbf9c4de03288d5d2414d6e84ce8ce5d9e49b9b6337f42dd845b54021bc7
BLAKE2b-256 checksum
How to use checksums
68ecf3b91304a82bfe4f0ac0ac2a7037d1e995a04f903cfd73ca297d06e65cc0
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-astra-db 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