pyeventsummary package

Submodules

pyeventsummary.pyeventsummary module

pyeventsummary.py

class pyeventsummary.pyeventsummary.EventSummary(enum_class: type[Enum] | None = None, enum_classes: list[type[Enum]] | None = None, num_exceptions_saved: int = 10, num_events_data_saved: int = 10)[source]

Bases: object

The errors class must be pickle ready since we may use it in multi-process, multi-thread or concurrent.futures contexts in which every thread or process will report its errors using this class.

A result of this is that we cannot hold the traceback object as is is not pickle able: TypeError: cant pickle traceback objects This means that if we want to store tracebacks as example we must convert them into some string format that can be pickled.

add(event_summary: EventSummary) → None[source]
add_event(value: Enum, data=None) → None[source]
add_many(event_summaries: Iterable[EventSummary]) → None[source]
err_msg = 'only enum values are allowed'
get_enum_classes() → Iterable[type[Enum]][source]
get_event_count(value: Enum) → int[source]
print(title: str | None = None, output_file_handle=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, show_zero_events: bool = False) → None[source]

pyeventsummary.static module

version which can be consumed from within the module

Module contents

Initialize the module