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. |
| Class Variable | payload |
Settings for payload size limits. |
| Async Static Method | _apply |
Undocumented |
| Static Method | _validate |
Undocumented |
| Async Method | _decode |
Undocumented |
| Async Method | _decode |
Undocumented |
| Async Method | _decode |
Undocumented |
| Async Method | _decode |
Undocumented |
| Async Method | _decode |
Undocumented |
| Async Method | _encode |
Undocumented |
| Async Method | _encode |
Undocumented |
| Async Method | _encode |
Undocumented |
| Async Method | _encode |
Undocumented |
| Async Method | _encode |
Undocumented |
| Method | _validate |
Undocumented |
| Method | _with |
Undocumented |
| Class Variable | _payload |
Server-reported limits for payloads. |
| Property | _decode |
Undocumented |
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.
async def _apply_to_failure_payloads(failure:
temporalio.api.failure.v1.Failure, cb: Callable[ [ temporalio.api.common.v1.Payloads], Awaitable[ None]]):
(source)
¶
Undocumented
def _validate_limits(payloads:
Sequence[ temporalio.api.common.v1.Payload], error_limit: int | None, error_message: str, warning_limit: int, warning_message: str):
(source)
¶
Undocumented
async def _decode_memo(self, source:
temporalio.api.common.v1.Memo) -> Mapping[ str, Any]:
(source)
¶
Undocumented
async def _decode_memo_field(self, source:
temporalio.api.common.v1.Memo, key: str, default: Any, type_hint: type | None) -> dict[ str, Any]:
(source)
¶
Undocumented
async def _decode_payload(self, payload:
temporalio.api.common.v1.Payload) -> temporalio.api.common.v1.Payload:
(source)
¶
Undocumented
async def _decode_payload_sequence(self, payloads:
Sequence[ temporalio.api.common.v1.Payload]) -> list[ temporalio.api.common.v1.Payload]:
(source)
¶
Undocumented
async def _encode_memo(self, source:
Mapping[ str, Any]) -> temporalio.api.common.v1.Memo:
(source)
¶
Undocumented
async def _encode_memo_existing(self, source:
Mapping[ str, Any], memo: temporalio.api.common.v1.Memo):
(source)
¶
Undocumented
async def _encode_payload(self, payload:
temporalio.api.common.v1.Payload) -> temporalio.api.common.v1.Payload:
(source)
¶
Undocumented
async def _encode_payload_sequence(self, payloads:
Sequence[ temporalio.api.common.v1.Payload]) -> list[ temporalio.api.common.v1.Payload]:
(source)
¶
Undocumented
def _validate_payload_limits(self, payloads:
Sequence[ temporalio.api.common.v1.Payload]):
(source)
¶
Undocumented
def _with_payload_error_limits(self, limits:
_ServerPayloadErrorLimits | None) -> DataConverter:
(source)
¶
Undocumented