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 mostrarGET /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.
Metadata
Release files for rustkissvdb 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rustkissvdb-0.1.1.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rustkissvdb-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.8 kB
Release files / rustkissvdb-0.1.1.tar.gz
| Download URL | rustkissvdb-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f05122d99f420ea84fc60df59afbe54db77b113e6d9e1a68df461ac3488f54e
|
|
BLAKE2b-256 checksum How to use checksums |
16bb12304a2b833a50a21dbacd966303397b48ed018502b30c3b8fc67933c266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / rustkissvdb-0.1.1-py3-none-any.whl
| Download URL | rustkissvdb-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1522a326de4beffa1a0fbcb0370f82d6015b2847d50146f83b9cfc48a6339bb
|
|
BLAKE2b-256 checksum How to use checksums |
23429a6ff24d44b943ee57421752198614aeccf56aa4833fe4f4acfe587f6d47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|