- Overview
- decode_entity_event_protobuf
decode_entity_event_protobuf
Part of Protobuf helpers in the Python API reference.
Related guidance: how-to/protobuf-decode, reference/wire-formats.
Runnable examples: decode_public_protobuf.py.
from picogrid_ecn_client import decode_entity_event_protobufDecode one entity event from the supported protobuf subset.
def decode_entity_event_protobuf( payload: bytes, *, integration: str, category: EntityCategory, maximum_payload_size: int = 1048576,) -> EntityEventParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| payload | bytes | — | Serialized protobuf payload. |
| integration | str | — | Topic-derived integration name. |
| category | EntityCategory | — | Topic-derived entity category. |
| maximum_payload_size | int | 1048576 | Inclusive payload limit in bytes, from 1024 through 16777216. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| EntityEvent | The decoded typed entity event. |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
| ProtocolError | If the payload is malformed, lacks required fields, or disagrees with the typed category context. |
| ResourceLimitError | If the payload exceeds maximum_payload_size bytes. |
| ValidationError | If an input or decoded public field is invalid. |
Version 0.2.0 · branch main
