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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rcabench-1.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cfb4ab438016a2da57a11489005263ebda9096a7a1ab5aaabc3bded9a18865e2
MD5 7668885802ef26a2b2edd1a1d281f464
BLAKE2b-256 6e12f15b090b8b981d3bba4aae411c8f5aef56421215eaed38a7e88180331055

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rcabench-1.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99239b08b0090a183cd12ff085481566cb6c9505c4ac009d34f270e62b89ab75
MD5 b65e23672e1ed580763c77e71bf893d7
BLAKE2b-256 1be235dcef384d772eca96d9bf71680c684e58cc54e0d29d35431a488994487f

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