Skip to main content

Cassandra Database Tools

Overview

The Cassandra Database Tools project is designed to help AI engineers efficiently integrate Large Language Models (LLMs) with Apache Cassandra® data. It facilitates optimized and safe interactions with Cassandra databases, supporting various deployments like Apache Cassandra®, DataStax Enterprise™, and DataStax Astra™.

Key Features

  • Fast Data Access: Optimized queries ensure most operations complete in milliseconds.
  • Schema Introspection: Enhances the reasoning capabilities of LLMs by providing detailed schema information.
  • Compatibility: Supports various Cassandra deployments, ensuring wide applicability.
  • Safety Measures: Limits operations to SELECT queries and schema introspection to prioritize data integrity.

Installation

Ensure your system has Python installed and proceed with the following installations via pip:

pip install python-dotenv cassio llama-index-tools-cassandra

Create a .env file for environmental variables related to Cassandra and Astra configurations, following the example structure provided in the notebook.

Environment Setup

  • For Cassandra: Configure CASSANDRA_CONTACT_POINTS, CASSANDRA_USERNAME, CASSANDRA_PASSWORD, and CASSANDRA_KEYSPACE.
  • For DataStax Astra: Set ASTRA_DB_APPLICATION_TOKEN, ASTRA_DB_DATABASE_ID, and ASTRA_DB_KEYSPACE.

How It Works

The toolkit leverages the Cassandra Query Language (CQL) and integrates with LLMs to provide an efficient query path determination for the user's requests, ensuring best practices for querying are followed. Using functions, the LLMs decision making can invoke the tool instead of designing custom queries. The result is faster and efficient access to Cassandra data for agents.

Tools Included

  • cassandra_db_schema: Fetches schema information, essential for the agent’s operation.
  • cassandra_db_select_table_data: Allows selection of data from a specific keyspace and table.
  • cassandra_db_query: An experimental tool that accepts fully formed query strings from the agent.

Example Usage

Initialize the CassandraDatabase and set up the agent with the tools provided. Query the database by interacting with the agent as shown in the example notebook.

Metadata

Release files for llama-index-tools-cassandra 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 llama-index-tools-cassandra 0.6.0
File Size Uploaded Provenance Actions
llama_index_tools_cassandra-0.6.0.tar.gz 10.8 kB Without provenance Details for llama_index_tools_cassandra-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-cassandra 0.6.0
File Interpreter ABI Platform Actions
llama_index_tools_cassandra-0.6.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_cassandra-0.6.0-py3-none-any.whl

Total release size: 21.7 kB

Release files / llama_index_tools_cassandra-0.6.0.tar.gz

Download URL llama_index_tools_cassandra-0.6.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
144b1221ab73357ffba5db169f902ab828835634b7f688ef248429e69373401a
BLAKE2b-256 checksum
How to use checksums
1786fc7b49d4532dbc714648c04ee7bf07088214bb44244040a958db79f81dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

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

Download URL llama_index_tools_cassandra-0.6.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c8e26c143f30d095fbb2f57544ae2cccd6f27ef854799d4a3acdcd8a2a396e7
BLAKE2b-256 checksum
How to use checksums
cc83c494d8946c5da06f9f62ce66342dd3ab5604706f33145a7faa1265608dde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}

Security for llama-index-tools-cassandra 0.6.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