class documentation

Base payload converter to/from multiple payloads/values.

Method from_payloads Decode payloads into values.
Method from_payloads_wrapper from_payloads for the temporalio.api.common.v1.Payloads wrapper.
Method to_payloads Encode values into payloads.
Method to_payloads_wrapper to_payloads for the temporalio.api.common.v1.Payloads wrapper.
@abstractmethod
def from_payloads(self, payloads: Sequence[temporalio.api.common.v1.Payload], type_hints: Optional[List[Type]] = None) -> List[Any]: (source)

Decode payloads into values.

Parameters
payloads:Sequence[temporalio.api.common.v1.Payload]Payloads to convert to Python values.
type_hints:Optional[List[Type]]Types that are expected if any. This may not have any types if there are no annotations on the target. If this is present, it must have the exact same length as payloads even if the values are just "object".
Returns
List[Any]Collection of Python values. Note, this does not have to be the same number as values given, but at least one must be present.
Raises
ExceptionAny issue during conversion.
def from_payloads_wrapper(self, payloads: Optional[temporalio.api.common.v1.Payloads]) -> List[Any]: (source)

from_payloads for the temporalio.api.common.v1.Payloads wrapper.

@abstractmethod
def to_payloads(self, values: Sequence[Any]) -> List[temporalio.api.common.v1.Payload]: (source)

Encode values into payloads.

Parameters
values:Sequence[Any]Values to be converted.
Returns
List[temporalio.api.common.v1.Payload]Converted payloads. Note, this does not have to be the same number as values given, but must be at least one and cannot be more than was given.
Raises
ExceptionAny issue during conversion.
def to_payloads_wrapper(self, values: Sequence[Any]) -> temporalio.api.common.v1.Payloads: (source)

to_payloads for the temporalio.api.common.v1.Payloads wrapper.