module documentation
Base converter and implementations for data conversion.
Class |
|
Advanced JSON encoder. |
Class |
|
Converter for 'binary/null' payloads supporting None values. |
Class |
|
Converter for 'binary/plain' payloads supporting bytes values. |
Class |
|
Converter for 'binary/protobuf' payloads supporting protobuf Message values. |
Class |
|
Composite payload converter that delegates to a list of encoding payload converters. |
Class |
|
Data converter for converting and encoding payloads to/from Python values. |
Class |
|
Default failure converter. |
Class |
|
Implementation of DefaultFailureConverter which moves message and stack trace to encoded attributes subject to a codec. |
Class |
|
Default payload converter compatible with other Temporal SDKs. |
Class |
|
Base converter to/from single payload/value with a known encoding for use in CompositePayloadConverter. |
Class |
|
Base failure converter to/from errors. |
Class |
|
Converter for 'json/plain' payloads supporting common Python values. |
Class |
|
Converter for 'json/protobuf' payloads supporting protobuf Message values. |
Class |
|
Converter for converting an object from Python json.loads result (e.g. scalar, list, or dict) to a known type. |
Class |
|
Codec for encoding/decoding to/from bytes. |
Class |
|
Base payload converter to/from multiple payloads/values. |
Function | decode |
Decode API search attributes to values. |
Function | decode |
Decode API search attributes to typed search attributes. |
Function | default |
Default data converter. |
Function | encode |
Convert search attribute values into a payload. |
Function | encode |
Convert search attributes into an API message. |
Function | encode |
Convert typed search attribute value into a payload. |
Function | value |
Convert a given value to the given type hint. |
Function | _decode |
Undocumented |
Function | _encode |
Undocumented |
Function | _get |
Isolates system version check and returns relevant datetime passer |
Variable | _ |
Undocumented |
Variable | _sym |
Undocumented |
def decode_search_attributes(api:
temporalio.api.common.v1.SearchAttributes
) -> temporalio.common.SearchAttributes
:
(source)
¶
Decode API search attributes to values.
Deprecated since version Use: typed search attributes instead.
Parameters | |
api:temporalio.api.common.v1.SearchAttributes | API message with search attribute values to convert. |
Returns | |
temporalio.common.SearchAttributes | Converted search attribute values (new mapping every time). |
def decode_typed_search_attributes(api:
temporalio.api.common.v1.SearchAttributes
) -> temporalio.common.TypedSearchAttributes
:
(source)
¶
Decode API search attributes to typed search attributes.
Parameters | |
api:temporalio.api.common.v1.SearchAttributes | API message with search attribute values to convert. |
Returns | |
temporalio.common.TypedSearchAttributes | Typed search attribute collection (new object every time). |
def encode_search_attribute_values(vals:
temporalio.common.SearchAttributeValues
) -> temporalio.api.common.v1.Payload
:
(source)
¶
Convert search attribute values into a payload.
Deprecated since version Use: typed search attributes instead.
Parameters | |
vals:temporalio.common.SearchAttributeValues | List of values to convert. |
Returns | |
temporalio.api.common.v1.Payload | Undocumented |
def encode_search_attributes(attributes:
Union[ temporalio.common.SearchAttributes, temporalio.common.TypedSearchAttributes]
, api: temporalio.api.common.v1.SearchAttributes
):
(source)
¶
Convert search attributes into an API message.
Parameters | |
attributes:Union[ | Search attributes to convert. The dictionary form of this is DEPRECATED. |
api:temporalio.api.common.v1.SearchAttributes | API message to set converted attributes on. |
def encode_typed_search_attribute_value(key:
temporalio.common.SearchAttributeKey[ temporalio.common.SearchAttributeValueType]
, value: Optional[ temporalio.common.SearchAttributeValue]
) -> temporalio.api.common.v1.Payload
:
(source)
¶
Convert typed search attribute value into a payload.
Parameters | |
key:temporalio.common.SearchAttributeKey[ | Key for the value. |
value:Optional[ | Value to convert. |
Returns | |
temporalio.api.common.v1.Payload | Payload for the value. |
def value_to_type(hint:
Type
, value: Any
, custom_converters: Sequence[ JSONTypeConverter]
= []) -> Any
:
(source)
¶
Convert a given value to the given type hint.
This is used internally to convert a raw JSON loaded value to a specific type hint.
Parameters | |
hint:Type | Type hint to convert the value to. |
value:Any | Raw value (e.g. primitive, dict, or list) to convert from. |
customSequence[ | Set of custom converters to try before doing default
conversion. Converters are tried in order and the first value that
is not JSONTypeConverter.Unhandled will be returned from
this function instead of doing default behavior. |
Returns | |
Any | Converted value. |
Raises | |
TypeError | Unable to convert to the given hint. |
def _decode_search_attribute_value(payload:
temporalio.api.common.v1.Payload
) -> temporalio.common.SearchAttributeValue
:
(source)
¶
Undocumented
def _encode_maybe_typed_search_attributes(non_typed_attributes:
Optional[ temporalio.common.SearchAttributes]
, typed_attributes: Optional[ temporalio.common.TypedSearchAttributes]
, api: temporalio.api.common.v1.SearchAttributes
):
(source)
¶
Undocumented