- Overview
- decode_public_protobuf
decode_public_protobuf
Part of Reusable workflows in the Python API reference.
Related guidance: shipped-tooling.
Runnable examples: decode_public_protobuf.py.
from picogrid_ecn_client.workflows import decode_public_protobufDecode one public entity-event protobuf payload without a connection.
def decode_public_protobuf( payload: bytes, *, integration: str, category: EntityCategory, maximum_payload_size: int = 1024 * 1024,) -> DecodePublicProtobufResultParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| payload | bytes | — | Serialized public entity-event protobuf bytes. |
| integration | str | — | Integration name carried by the source topic. |
| category | EntityCategory | — | Entity category carried by the source topic. |
| maximum_payload_size | int | 1024 * 1024 | Largest payload accepted, in bytes. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| DecodePublicProtobufResult | The validated public entity event. |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
| ProtocolError | If the payload is malformed or disagrees with its category. |
| ResourceLimitError | If payload exceeds maximum_payload_size. |
| ValidationError | If an input or decoded public field is invalid. |
Version 0.2.0 · branch main
