Skip to main content

CortexDB Python SDK

PyPI version PyPI downloads PyPI - Python Version

A Python client for the CortexDB RAG backend, providing easy access to ingestion, querying, and LLM orchestration.

Features

  • Setup API: Configure LLM providers (Gemini, OpenAI, Azure).
  • Ingest API: Ingest documents with automatic embedding generation.
  • Query API: Perform semantic search, entity retrieval, and graph traversals.
  • Native LLM Integration: Uses google-genai for native Gemini support.

Installation

pip install cortexdb-py

Or visit the package on PyPI.

Usage

See main.py for a complete example of setting up a medical chatbot.

from cortexdb import CortexDB

db = CortexDB("http://localhost:8080")

# Setup
db.setup.configure(provider="GEMINI", api_key="...", chat_model="gemini-2.0-flash", embed_model="gemini-embedding-001")

# Ingest
db.ingest.document(uid="user-1", document_title="Test Doc", document_text="Hello world")
db.ingest.prompt(uid="user-1", converser="USER", text="What is this?")

# Query
results = db.query.search_contexts("Hello", limit=5)

Testing

pip install pytest respx
pytest tests/

Metadata

Release files for cortexdb-py 0.2.15

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

Source distribution (sdist)

Source distribution for cortexdb-py 0.2.15
File Size Uploaded Provenance Actions
cortexdb_py-0.2.15.tar.gz 8.3 kB Without provenance Details for cortexdb_py-0.2.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cortexdb-py 0.2.15
File Interpreter ABI Platform Actions
cortexdb_py-0.2.15-py3-none-any.whl Python 3 none any Details for cortexdb_py-0.2.15-py3-none-any.whl

Total release size: 19.7 kB

Release files / cortexdb_py-0.2.15.tar.gz

Download URL cortexdb_py-0.2.15.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e7a51ca0fdb7e539c9ac5f9dcde6744bf3a6a12ad674286359863c3cb71309ac
BLAKE2b-256 checksum
How to use checksums
b6c1353a484bc5434f6e6ae6ce26899e639b9880181e7c2f3f440d664a0007e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.25 Linux/6.17.0-1010-azure

Release files / cortexdb_py-0.2.15-py3-none-any.whl

Download URL cortexdb_py-0.2.15-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ddff8c55773f2d7961d514a8f835022587c672fd069ba051c3c6d6512e43dd3
BLAKE2b-256 checksum
How to use checksums
84d53f0af17fb4d134dd8491aac8f84671737b5520e2dec84db20c5fa6ecd315
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.25 Linux/6.17.0-1010-azure

Security for cortexdb-py 0.2.15

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