Install
Quickstart
Honest scope (B-lite)
This package is the B-lite scope from the consolidated 10-week plan. It covers:- REST client for the data-science-facing endpoints
(
/recommend,/respond,/decisions/:id/shap,/decisions/:id/narrative,/fairness/evaluate). - A SHAP-to-matplotlib bar plot helper.
- A fairness audit wrapper with a four-fifths-rule bar plot.
- Three reference notebooks under
platform/integrations/python/examples/.
openapi-generator-cli recipe
For languages other than Python — or for the CRUD endpoints not wrapped by the kaireon package — generate a client straight from the platform’s OpenAPI spec:MCP SDK example (mcp-py)
/mcp (SSE transport). Headers
match the REST client (X-API-Key, X-Tenant-Id).
Distribution status
The package currently lives in-repo atplatform/integrations/python/ while it stabilizes. Splitting into a
dedicated kaireonai/kaireon-py repository and publishing the
kaireon==0.1.0a1 artifact to PyPI requires operator authorization
(GitHub repo creation + PyPI credentials). When that lands, the
import path will be unchanged — from kaireon import KaireonClient.
Reading DecisionTrace from the analytics replica
Direct DB queries againstdecision_traces are common in offline
policy replay. The analytics extra ships polars +
psycopg so that pattern is one import:
scoring_results JSON column has the same shape returned by
/recommend (offerId, score, shapValues, etc.).