Skip to main content

Python SDK for CortexDB — a RAG-powered memory database

Project description

CortexDB Python SDK

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 -e .

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", converser="USER", content="Hello world")

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

Testing

pip install pytest respx
pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cortexdb_py-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cortexdb_py-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file cortexdb_py-0.1.0.tar.gz.

File metadata

  • Download URL: cortexdb_py-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.14.0-1017-azure

File hashes

Hashes for cortexdb_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4860cef52a871a4f587d87c77b4d4910df8900231e21fea9656cbfad67cac790
MD5 67ce72ae1fa75800bda0e6f03cdc174f
BLAKE2b-256 c8aaddd6cfeb2a8f2fa21254b776d09b1b2de8a95ff6088e8b99faf8978f1017

See more details on using hashes here.

File details

Details for the file cortexdb_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cortexdb_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.9.25 Linux/6.14.0-1017-azure

File hashes

Hashes for cortexdb_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1aef3820807067ab78486987d25fc662a318f6b34dd1ccefb1bfb74648db0232
MD5 35889320d92c5d59ccfb1416cdb31182
BLAKE2b-256 f71254b53238afaa9bed4f03c1516a571ba99b3617f226b45d590292bf0d0834

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page