Python API¶
The public Python API, generated from the docstrings. The command line is the primary interface; this API is for running CredenceStack from your own code and tests.
| Page | What it covers |
|---|---|
| credencestack | run, select_packs, verify, load_profile, grader_for; the scenario, finding, result and statistics models; settings; the errors |
| credencestack.connectors | Connecting an agent: the connector protocol, get_connector, options |
| credencestack.env | The simulated back office: the environment, its tools and seed data |
| credencestack.forge | Generating labelled scenarios: the generator, mutators, the difficulty dial, labelling |
| credencestack.otel | Telemetry: resolve the settings, start and stop, propagation |
Only these packages are public. Every other module (credencestack.evidence,
credencestack.runner, credencestack.reports, credencestack._internal and the rest) is
internal and may change between releases; the developer reference
describes them for contributors.
Errors are subclasses of CredenceStackError; each carries a message, an optional hint and
a docs page, and maps to a command exit code.