Python client library for the Kamiwaza AI Platform
Project description
Kamiwaza Python SDK
Python client library for interacting with the Kamiwaza AI Platform. This SDK provides a type-safe interface to all Kamiwaza API endpoints with built-in authentication, error handling, and resource management.
Installation
pip install kamiwaza-sdk
Naming note: Install the package as
kamiwaza-sdk, but import it askamiwaza_sdk. A deprecatedkamiwaza_clientalias remains for older snippets, though new code should preferkamiwaza_sdk.
Version compatibility: This SDK (version 0.5.1+) is incompatible with Kamiwaza versions before 0.5.1. Please ensure you're using the latest version of Kamiwaza.
Python SDK Usage
from kamiwaza_sdk import KamiwazaClient
from kamiwaza_sdk.authentication import UserPasswordAuthenticator
from kamiwaza_sdk.schemas.auth import PATCreate
client = KamiwazaClient("https://localhost/api")
# Option 1 (recommended): Personal Access Token
# export KAMIWAZA_API_KEY=<your-pat>
# client automatically loads the token and reuses it for every request.
# Option 2: bootstrap with username/password to mint a PAT
client.authenticator = UserPasswordAuthenticator("admin", "kamiwaza", client.auth)
pat = client.auth.create_pat(PATCreate(name="local-bootstrap")).token
print("Save this token:", pat)
Examples
The /examples directory contains Jupyter notebooks demonstrating various use cases:
- Model Download and Deployment - A comprehensive guide to searching, downloading, deploying, and using models with the Kamiwaza SDK
- Quick Model Deployment - Streamlined approach to download and deploy models using a single function
- Model Evaluation - How to evaluate and benchmark multiple language models for performance comparison using the streamlined
download_and_deploy_modelfunction - Structured Output - Using Kamiwaza's OpenAI-compatible interface to generate structured outputs with specific JSON schemas
- Function Calling - Demonstrates how to use function calling (tools) with Kamiwaza's OpenAI-compatible API
- Web Agent - Build an AI agent that can browse and interact with web pages
- RAG Demo - Retrieval Augmented Generation using Kamiwaza's vector database and embedding services
- App Garden and Tool Shed - Deploy containerized applications and MCP Tool servers
More examples coming soon!
Service Overview
| Service | Description | Documentation |
|---|---|---|
client.models |
Model management | Models Service |
client.serving |
Model deployment | Serving Service |
client.vectordb |
Vector database | VectorDB Service |
client.catalog |
Data management | Catalog Service |
client.embedding |
Text processing | Embedding Service |
client.retrieval |
Search | Retrieval Service |
client.cluster |
Infrastructure | Cluster Service |
client.lab |
Lab environments | Lab Service |
client.auth |
Security | Auth Service |
client.authz |
Authorization tuples/checks | AuthZ Service |
client.activity |
Monitoring | Activity Service |
client.openai |
OpenAI API compatible | OpenAI Service |
client.apps |
App deployment | App Service |
client.tools |
Tool servers (MCP) | Tool Service |
client.ingestion |
Data ingestion | Ingestion Service |
Integration Tests
The tests/integration suite spins up a MinIO fixture via Docker Compose and
exercises the ingestion → catalog flow using the SDK. Run it with:
pytest -m integration
Note: Retrieval checks are currently marked
xfailbecause the live deployment returns HTTP 500 while Ray-backed transport is being stabilised.
The Kamiwaza SDK is actively being developed with new features, examples, and documentation being added regularly. Stay tuned for updates including additional example notebooks, enhanced documentation, and expanded functionality across all services.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 kamiwaza_sdk-0.8.1.tar.gz.
File metadata
- Download URL: kamiwaza_sdk-0.8.1.tar.gz
- Upload date:
- Size: 69.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f92710704623d8d037a38d4362880da1edeec934160785cd9f311c9a3aa566
|
|
| MD5 |
5b7b2c0df25d246546f615baf1fa70b6
|
|
| BLAKE2b-256 |
1a5607b367c5eaf2ebb2d65d3260e0e5ae6231b54099b5bef394330407088c75
|
File details
Details for the file kamiwaza_sdk-0.8.1-py3-none-any.whl.
File metadata
- Download URL: kamiwaza_sdk-0.8.1-py3-none-any.whl
- Upload date:
- Size: 90.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcd4ae0a707e607a31bf4fd1307bc3c00b5e182e4131c2022fd9ee69bd39fc61
|
|
| MD5 |
708e5950fee9efe743d47578043ae899
|
|
| BLAKE2b-256 |
3b72c3f45cabec21b153c8f6cbaadb291860a3759cd59946212c8aab9109c198
|