Skip to main content

SDK Python para RustKissVDB (state, vector, docstore, sql y stream).

Project description

RAG-client-py

SDK Python oficial para RustKissVDB + ejemplos de referencia (chat RAG + ingestión de PDF).

Instalación

uv pip install -e .
# o
pip install -e .

Extras para las demos (PyMuPDF):

pip install -e .[rag]

Configuración

Copia .env.example.env y ajusta:

RUSTKISS_URL=http://127.0.0.1:9917
RUSTKISS_API_KEY=dev
VDB_COLLECTION=docs_demo
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_EMBED_MODEL=embeddinggemma:300m
OLLAMA_CHAT_MODEL=gemma3:4b

El SDK también expone Config.from_env() para cargar estas variables automáticamente.

Variables soportadas:

Variable Descripción
RUSTKISS_URL / VDB_BASE_URL Base URL del API (http://127.0.0.1:9917).
RUSTKISS_API_KEY / API_KEY Token Authorization: Bearer.
RUSTKISS_TIMEOUT Timeout en segundos (default 30).
PORT_RUST_KISS_VDB Puerto fallback si no defines URL.
VDB_COLLECTION Colección por defecto para los ejemplos.

Uso básico

from rustkissvdb import Client, Config

cfg = Config.from_env()
with Client(cfg.base_url, api_key=cfg.api_key, timeout=cfg.timeout) as client:
    client.state.put("foo", {"value": 1})
    hits = client.vector.search("docs", [0.1, 0.2], k=3, include_meta=True)
    collections = client.vector.list()
    info = client.vector.info(collections[0]["collection"])
    client.doc.put("tickets", "tk_1", {"title": "Bug"})
    client.sql.execute("CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY, body TEXT)")

Ejemplos

  • examples/chat_rag_pdf.py: CLI de chat que almacena memoria en RustKissVDB y usa Ollama para embeddings/chat.
  • examples/ingest_pdf_to_vdb.py: chunk + embed de un PDF y lo sube a la colección vectorial.
  • examples/vector_list_info.py: script corto para listar colecciones y mostrar GET /v1/vector/{collection}.

Ambos se apoyan en el SDK (rustkissvdb.Client) y usan las variables .env.

Scripts legacy

Los scripts originales fueron migrados a examples/. El paquete exporta:

  • Client (client.state, client.vector, client.doc, client.sql, client.stream)
  • Config (Config.from_env())
  • RustKissVDBError

Consulta docs/SDK_PYTHON.md para más detalles.

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

rustkissvdb-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

rustkissvdb-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file rustkissvdb-0.1.1.tar.gz.

File metadata

  • Download URL: rustkissvdb-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rustkissvdb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2f05122d99f420ea84fc60df59afbe54db77b113e6d9e1a68df461ac3488f54e
MD5 df5cbadb5643e2cf7130d566bacbeac3
BLAKE2b-256 16bb12304a2b833a50a21dbacd966303397b48ed018502b30c3b8fc67933c266

See more details on using hashes here.

File details

Details for the file rustkissvdb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rustkissvdb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rustkissvdb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1522a326de4beffa1a0fbcb0370f82d6015b2847d50146f83b9cfc48a6339bb
MD5 ca3de159a54bd7c5f91511e359dd5971
BLAKE2b-256 23429a6ff24d44b943ee57421752198614aeccf56aa4833fe4f4acfe587f6d47

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