m3resp.event_to_dict#
- m3resp.event_to_dict(value)[source]#
Return the fields of an event, interval or breath as a dictionary.
- Parameters:
value (Event | Interval | Mapping[str, Any] | Any) – An
Event,IntervalorBreathEvent, another dataclass instance, a dictionary, or an iterable of key-value pairs.- Returns:
- All fields, including timing, identifier and metadata.
Dataclass fields are copied recursively; dictionary inputs are copied at the top level. Field values keep their existing types.
- Return type:
- Raises:
TypeError – If the input cannot be read as a dictionary.
ValueError – If a key-value pair has an invalid length.