StepObserver

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class StepObserver(*args, **kwargs)[source]

Bases: Protocol

Optional sink for StepRecord events.

Implementations must treat wants as a pure filter: when it returns False, pipelines skip calling the observer for that step so unused records cost nothing beyond the existing intermediate objects.

wants(step: str) → bool[source]

Return whether this observer cares about step.

__call__(record: StepRecord) → None[source]

Receive one step record.

__init__(*args, **kwargs)