bobocep.cep.event.history.BoboHistory
- class bobocep.cep.event.history.BoboHistory(events: Dict[str, List[BoboEvent]])[source]
Bases:
BoboJSONableAn event history.
- __init__(events: Dict[str, List[BoboEvent]])[source]
- Parameters:
events – The history of events. Keys are group names. Values are lists of BoboEvent instances associated with a group.
- first() BoboEvent | None[source]
- Returns:
The BoboEvent with the oldest timestamp, if there is at least one BoboEvent in the history.
- static from_json_dict(d: dict) BoboHistory[source]
- Parameters:
d – A JSON dict representation of the history.
- Returns:
A new instance of the history.
- static from_json_str(j: str) BoboHistory[source]
- Parameters:
j – A JSON str representation of the history.
- Returns:
A new instance of the history.
- group(group: str) Tuple[BoboEvent, ...][source]
- Parameters:
group – A group name.
- Returns:
The BoboEvent instances associated with group.