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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rcabench-1.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5cb3ea072f5e20979d57178921c277643656f24cf75b739e737d08590e3d708d
MD5 5b4b5040622828681ccfb31ad35191e0
BLAKE2b-256 2a8221090a482987ca07dab6be912fcbd38e9b5c358daecc6c8b2a6d1935e553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rcabench-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 440.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a96ac4776a24665ec11d42889ef2c3f6a0a3a33b116e5d60e4614c87f80d1a1c
MD5 dc63e0755ff718cedaf1b6d96f9255c4
BLAKE2b-256 dbe4a658f5487882dd38069ffba08786f1c62be460881683ca41655b16a4629a

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