event

class Event[source]

Container for a single value returned from a single Node.process() call

id: int

Unique ID for each event

timestamp: Annotated[datetime, BeforeValidator(func=_from_isoformat, json_schema_input_type=PydanticUndefined), PlainSerializer(func=_to_isoformat, return_type=PydanticUndefined, when_used=json)]

Timestamp of when the event was received by the TubeRunner

node_id: str

ID of node that emitted the event

signal: str

name of the signal that emitted the event

epoch: int

Epoch number the event was emitted in

value: Annotated[Any, BeforeValidator(func=_from_jsonable_pickle, json_schema_input_type=PydanticUndefined), WrapSerializer(func=_to_jsonable_pickle, return_type=PydanticUndefined, when_used=json)]

Value emitted by the processing node

class MetaEventType(*values)[source]

Types of meta events emitted by tubes, schedulers, stores, and runners.

NodeReady = 'NodeReady'

A node was made ready in the toplogical sorting graph. The value of the event is the node_id of the node that is ready.

EpochEnded = 'EpochEnded'

An epoch has ended, the value of the event contains which epoch has ended

class MetaEvent[source]

All events generated by internal processes rather than nodes.

Used to coordinate the tube as well as allow code to hook into tube execution.

These are not stored in the EventStore, but emitted by callbacks and consumed internally.

See MetaEventType for descriptions of the types of MetaEvents.

id: int
timestamp: Annotated[datetime, BeforeValidator(func=_from_isoformat, json_schema_input_type=PydanticUndefined), PlainSerializer(func=_to_isoformat, return_type=PydanticUndefined, when_used=json)]
epoch: int
value: Annotated[Any, BeforeValidator(func=_from_jsonable_pickle, json_schema_input_type=PydanticUndefined), WrapSerializer(func=_to_jsonable_pickle, return_type=PydanticUndefined, when_used=json)]
node_id: Literal['meta']
signal: MetaEventType
class MetaSignal(*values)[source]
NoEvent = 'NoEvent'