Skip to main content

RCABench - A comprehensive root cause analysis benchmarking platform for microservices

Project description

RCABench Python SDK

The SDK exposes two handwritten entry clients on top of the generated OpenAPI package:

  • RCABenchClient: public/business API client authenticated by Key ID + Key Secret
  • RCABenchRuntimeClient: runtime-only client authenticated by service token

Generated OpenAPI code lives under src/rcabench/openapi. Handwritten auth/session logic lives under src/rcabench/client.

Installation

pip install rcabench

For local development:

cd sdk/python
pip install -e .

Authentication Model

Secrets are never passed directly in code. The SDK reads credentials from environment variables only.

Public Client

Required environment variables:

export RCABENCH_BASE_URL="http://localhost:8082"
export RCABENCH_KEY_ID="pk_xxx"
export RCABENCH_KEY_SECRET="sk_xxx"

RCABenchClient exchanges the key pair for a bearer token through the API-key token endpoint, then reuses the authenticated OpenAPI client.

Runtime Client

Required environment variables:

export RCABENCH_BASE_URL="http://localhost:8082"
export RCABENCH_SERVICE_TOKEN="runtime_token_xxx"

RCABenchRuntimeClient is intended for managed runtime/wrapper usage. It injects the service token into the generated OpenAPI client directly.

Usage

Public API Client

from rcabench import RCABenchClient
from rcabench.openapi.api.datasets_api import DatasetsApi

client = RCABenchClient()
api = DatasetsApi(client.get_client())

datasets = api.list_sdk_dataset_samples(page=1, size=10)
print(datasets)

You may still override base_url in code when needed:

client = RCABenchClient(base_url="http://localhost:8082")

Runtime API Client

from rcabench import RCABenchRuntimeClient

runtime_client = RCABenchRuntimeClient()
api_client = runtime_client.get_client()

print(api_client.configuration.host)

RCABenchRuntimeClient stays as a thin authenticated connector only. Runtime upload/report timing and orchestration semantics belong in the external managed wrapper layer, not in this SDK client.

Development

Run type checking only on handwritten SDK code:

cd sdk/python
uv run --with pyright pyright src/rcabench/client

The generated package under src/rcabench/openapi is excluded from Pyright.

Project details


Release history Release notifications | RSS feed

This version

1.3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rcabench-1.3.0.tar.gz (105.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rcabench-1.3.0-py3-none-any.whl (440.1 kB view details)

Uploaded Python 3

File details

Details for the file rcabench-1.3.0.tar.gz.

File metadata

  • Download URL: rcabench-1.3.0.tar.gz
  • Upload date:
  • Size: 105.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rcabench-1.3.0.tar.gz
Algorithm Hash digest
SHA256 d679c233b39506350f27ffab4065139731dec2c6507be2b84052ee276c60be51
MD5 3ab96f7222dc088e097af0eeb240f634
BLAKE2b-256 52f5e9a752304635d504bc74040b712aa6ed538d6ab08a2cdbbf92aa211f5ddf

See more details on using hashes here.

File details

Details for the file rcabench-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: rcabench-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 440.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rcabench-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 588eebff3627cb8a2d75b0aa1a7caa3e7152ce7b723bbab029c5ee048e88f8d1
MD5 370932a79cfda1eb1e82a540cae32340
BLAKE2b-256 6cfb57a8f7fef97dadd2ecfff24d991d68da32a656d30c540d865708320bb963

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page