Skip to main content

Berliant

Berliant is a Python library for discovering stochastic failure-inducing capability interactions.

Status

Berliant is currently an early-stage research-oriented Python library.

Current version: 0.1.0

Requirements

  • Python 3.10 or newer
  • uv is recommended for development

Quickstart

Berliant exposes its primary API directly from the package root.

from berliant import KeyedSimulator, load_scenario, validated_scif

scenario = load_scenario(
    "benchmarks/bsib_01/mixed/BSIB-MIXED-001.yaml"
)

simulator = KeyedSimulator(
    scenario=scenario,
    seed=42,
)

discovery = validated_scif(
    invoke=simulator.invoke,
    capabilities=scenario.capabilities,
)

report = discovery.discover()

print(report.executions)
print([
    candidate.capabilities
    for candidate in report.pairwise_report.candidates
])

if report.higher_order is not None:
    print(report.higher_order.candidate)

Run the included example:

uv run python examples/quickstart.py

Public API

Primary imports:

from berliant import (
    SCIF,
    KeyedSimulator,
    Scenario,
    load_scenario,
    validated_scif,
)
  • validated_scif(...) uses the configuration evaluated in Berliant's benchmark experiments.
  • SCIF(...) provides full parameter control.
  • KeyedSimulator provides deterministic configuration-keyed stochastic simulation.
  • Scenario and load_scenario(...) define and load benchmark scenarios.

Discovery Report

discover() returns an SCIFV4Report containing:

  • pairwise_report
  • residual
  • higher_order
  • executions

Development

uv run ruff check .
uv run mypy src
uv run pytest -q

License

Licensed under the Apache License 2.0.

Download files

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

Source Distribution

berliant-0.1.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

berliant-0.1.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file berliant-0.1.0.tar.gz.

File metadata

  • Download URL: berliant-0.1.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for berliant-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5c601b56858d96ba576c92ed94daefab1c8f0721faa617f64289681e2e4ad7af
MD5 06b779134f99b5c9c3f9cb6ff7c6e8ea
BLAKE2b-256 8ed512865a392c5e70fab1df38048a16daab583aee508a59c99e94321710bd1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for berliant-0.1.0.tar.gz:

Publisher: publish-pypi.yml on fahmihkm97/berliant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file berliant-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: berliant-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for berliant-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faf5647c9ffc5cc2e80f5debf99b6ebb29552595439e73c872974681cc916ccd
MD5 c788080cf2263bec70d71fc3f0a9a94d
BLAKE2b-256 0ac8600754a969a29ac4305efee8725502880da1df5c46dcf9132a6670d70660

See more details on using hashes here.

Provenance

The following attestation bundles were made for berliant-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on fahmihkm97/berliant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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