CallbackDefinition¶
-
class passengersim.callbacks.configured.CallbackDefinition(factory: Callable[[BaseModel], Any], when: 'initialize_sample' | 'begin_sample' | 'daily' | 'end_sample' | 'finalize_sample', parameters_model: type[BaseModel], version: str, output_name: str | None =
None)[source]¶ Bases:
objectFactory metadata used to validate and construct one callback per simulation.
Methods
__init__(factory, when, parameters_model, ...)Attributes
Canonical tracer result key, or None for an ordinary callback.
Construct a fresh callable from one validated options model.
Lifecycle hook for the constructed callback.
Schema used for runtime validation without changing explicit config.
Implementation version checked against an explicit config requirement.
- when : Literal['initialize_sample', 'begin_sample', 'daily', 'end_sample', 'finalize_sample']¶
Lifecycle hook for the constructed callback.
- parameters_model : type[BaseModel]¶
Schema used for runtime validation without changing explicit config.
- version : str¶
Implementation version checked against an explicit config requirement.
-
output_name : str | None =
None¶ Canonical tracer result key, or None for an ordinary callback.