Standalone Python SDK for the Kyvos REST API. Handles authentication, connection/dataset/DRD/SM/dashboard CRUD, column refresh, folder management, and query execution. Includes retry logic, structured logging, and both XML and JSON payload modes.
pip install kyvos-sdk-pythonfrom kyvos_sdk import KyvosService
from kyvos_sdk.config import KyvosConfig
# Configure via KyvosConfig or constructor params
svc = KyvosService(
base_url="http://localhost:8080/api/v1",
username="admin",
password="admin",
)
svc.initialize()
# Create a connection
conn_id, created = svc.create_or_update_connection_xml(
name="MyConnection",
host="localhost", port=5432, database="mydb",
username="postgres", password="secret",
)
# Create a folder
folder_id, folder_name = svc.create_folder("My Datasets", "RDATASET")
# Create a semantic model
svc.create_semantic_model_xml(smodel_xml="<CUBE>...</CUBE>")The SDK supports two authentication modes:
- Token-based: Pass
auth_tokento the constructor (usessessionidheader) - Username/Password: Pass
usernameandpassword; the SDK callsPOST /rest/loginautomatically
# Token-based
svc = KyvosService(base_url="...", auth_token="session-12345")
# Username/password (auto-login on 401)
svc = KyvosService(base_url="...", username="admin", password="admin")- Connection management — Create/update connections (XML + JSON modes)
- Dataset CRUD — Create datasets from table specs, refresh columns
- DRD management — Create dataset relationship diagrams, resolve IDs
- Semantic model lifecycle — Create, add measures, publish
- Dashboard creation — Create dashboards from specs
- Folder management — Create and list folders
- Query execution — Run MDX/SQL queries via MCP client
- Retry logic — Exponential backoff with tenacity
- Structured logging — Standard Python logging throughout
- Quickstart
- Authentication
- Entity Operations
- Payload Formats
- API Reference
- Platform Implementation Roadmap
kyvos_sdk.contractsSpecification
Apache 2.0 — See LICENSE for details.