module documentation

Shared data types for the Workflow Streams contrib module.

The user-facing data fields on WorkflowStreamItem are temporalio.api.common.v1.Payload. Per-item values are converted to Payload by the payload converter at publish time, and the resulting bytes/metadata are preserved per item so subscribers can decode with subscribe(result_type=T). The codec chain (e.g. encryption, compression) applies once at the outer signal/update envelope level — not separately to each embedded item — so codec behavior is symmetric between workflow-side and client-side publishing.

The wire representation (PublishEntry, _WorkflowStreamWireItem) uses base64-encoded Payload.SerializeToString() bytes because the default JSON payload converter cannot serialize a Payload embedded inside a dataclass (it only special-cases top-level Payloads on signal/update args).

Type Variable T Undocumented
Class _WorkflowStreamWireItem Wire representation of a WorkflowStreamItem (base64 of serialized Payload).
Function _decode_payload Inverse of _encode_payload.
Function _encode_payload Wire format: base64(Payload.SerializeToString()).

Undocumented

Value
TypeVar('T')
def _decode_payload(wire: str) -> Payload: (source)

Inverse of _encode_payload.

def _encode_payload(payload: Payload) -> str: (source)

Wire format: base64(Payload.SerializeToString()).