class documentation
class DataConverter(WithSerializationContext): (source)
Data converter for converting and encoding payloads to/from Python values.
This combines PayloadConverter which converts values with
PayloadCodec which encodes bytes.
| Method | __post |
Undocumented |
| Async Method | decode |
Decode payloads into values. |
| Async Method | decode |
Decode and convert failure. |
| Async Method | decode |
decode for the temporalio.api.common.v1.Payloads wrapper. |
| Async Method | encode |
Encode values into payloads. |
| Async Method | encode |
Convert and encode failure. |
| Async Method | encode |
encode for the temporalio.api.common.v1.Payloads wrapper. |
| Method | with |
Return an instance with context set on the component converters. |
| Class Variable | default |
Singleton default data converter. |
| Class Variable | failure |
Failure converter created from the failure_converter_class. |
| Class Variable | payload |
Optional codec for encoding payload bytes. |
| Class Variable | payload |
Payload converter created from the payload_converter_class. |
async def decode_failure(self, failure:
temporalio.api.failure.v1.Failure) -> BaseException:
(source)
¶
Decode and convert failure.
async def decode_wrapper(self, payloads:
temporalio.api.common.v1.Payloads | None, type_hints: list[ type] | None = None) -> list[ Any]:
(source)
¶
decode for the
temporalio.api.common.v1.Payloads wrapper.
Encode values into payloads.
First converts values to payloads then encodes payloads using codec.
| Parameters | |
values:Sequence[ | Values to be converted and encoded. |
| Returns | |
list[ | Converted and encoded 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. |
async def encode_failure(self, exception:
BaseException, failure: temporalio.api.failure.v1.Failure):
(source)
¶
Convert and encode failure.
async def encode_wrapper(self, values:
Sequence[ Any]) -> temporalio.api.common.v1.Payloads:
(source)
¶
encode for the
temporalio.api.common.v1.Payloads wrapper.