class documentation

Composite payload converter that delegates to a list of encoding payload converters.

Encoding/decoding are attempted on each payload converter successively until it succeeds.

Method __init__ Initializes the data converter.
Method from_payloads Decode values trying each converter.
Method to_payloads Encode values trying each converter.
Instance Variable converters List of payload converters to delegate to, in order.

Inherited from PayloadConverter:

Method from_payloads_wrapper from_payloads for the temporalio.api.common.v1.Payloads wrapper.
Method to_payloads_wrapper to_payloads for the temporalio.api.common.v1.Payloads wrapper.
def __init__(self, *converters: EncodingPayloadConverter): (source)

Initializes the data converter.

Parameters
*converters:EncodingPayloadConverterPayload converters to delegate to, in order.
def from_payloads(self, payloads: Sequence[temporalio.api.common.v1.Payload], type_hints: Optional[List[Type]] = None) -> List[Any]: (source)

Decode values trying each converter.

See base class. Always returns the same number of values as payloads.

Raises
KeyErrorUnknown payload encoding
RuntimeErrorError during decode
def to_payloads(self, values: Sequence[Any]) -> List[temporalio.api.common.v1.Payload]: (source)

Encode values trying each converter.

See base class. Always returns the same number of payloads as values.

Raises
RuntimeErrorNo known converter
converters = (source)

List of payload converters to delegate to, in order.