KubeMind Python SDK (kubemind-sdk)
The official Python client library for KubeMind — the self-hosted intelligent AI gateway and governance control plane.
Installation
pip install kubemind-sdk
Quickstart
from kubemind import KubeMindClient
# Initialize client with API key and workspace ID
client = KubeMindClient(
api_key="your-api-key",
workspace_id="default",
router_url="http://localhost:9080",
mind_url="http://localhost:9081",
sentinel_url="http://localhost:9083",
)
# 1. Chat completion with intent classification & sensitivity governance
completion = client.chat_completion(
model="llama3.1",
messages=[
{"role": "user", "content": "Email alice@example.com the summary report"}
]
)
print("Response:", completion["choices"][0]["message"]["content"])
print("Routing Decision:", completion.get("routing_decision"))
# 2. Semantic prompt routing
route = client.route("What is our company expense policy?")
print("Content:", route.get("content"))
print("Retrieval Status:", route.get("retrieval_status"))
# 3. CFO Cost & Usage Analytics
analytics = client.get_cost_analytics(window_hours=24)
print(f"Total Requests: {analytics['total_requests']}")
print(f"Estimated Spend ($): {analytics['estimated_spend_usd']}")
# 4. Cryptographic Ledger Verification
audit = client.verify_audit_ledger()
print("Ledger Intact:", audit.get("verified"))
Features
- Pre-Dispatch Sensitivity Gating: Inline regex + local offline NER tokenization with in-memory reversible restoration.
- Intent-Driven Routing: Routes prompts dynamically based on classified semantic intent.
- Fail-Closed Grounding: Distinguishes verified corporate knowledge from hallucinations.
- SHA-256 Tamper-Evident Ledger: Verifiable cryptographic audit trail for HIPAA/SOC2 compliance.
- Granular RBAC: Supports role-scoped API keys (
admin,developer,auditor,viewer).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kubemind_sdk-0.1.0.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubemind_sdk-0.1.0.tar.gz.
File metadata
- Download URL: kubemind_sdk-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ca6705e5ca79ff29a615ed81772a01d3c8cd7ccac1c490fbd736de8af00a90
|
|
| MD5 |
05c77ea1a7e187f688359776ee7c5a94
|
|
| BLAKE2b-256 |
58a99e4bbb9b737b446395a7bc80f01df0403777f28ca7d9579513a892d9f5b4
|
File details
Details for the file kubemind_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kubemind_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1ab7ee80e030912a00b305ff2810f259445e7009970b130eb423da367ea27c
|
|
| MD5 |
8d6089fd42d379b04ad0ac8f3f7448d3
|
|
| BLAKE2b-256 |
65211636a8cbee1cd98656a5103adfb599fc6e470559588b2a03810e5eaef15c
|