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.3

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.3.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.3-py3-none-any.whl (440.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rcabench-1.3.3.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.3.tar.gz
Algorithm Hash digest
SHA256 a08e67cd9cec85dd1609771ebf06e06654fe0425f8044ffb7a14216c1d6b2626
MD5 e0ad990aad4806c8ec6e044bcc384c44
BLAKE2b-256 a820fa32e1604c4c8959b285750d6b7bdf66e4dc7ca16be399ea44bd233ff78b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rcabench-1.3.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 43ac78ea1890b30d62a23f3f62f1bc35f1746cdb3a7dae547fe231e9b4865ed1
MD5 3d1a9088c1b0d7717725cfe805c287e9
BLAKE2b-256 cfe034954012647983e814abd5407cf2be116ea9926e859e57fa12955a7ca399

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