module documentation

Base converter and implementations for data conversion.

Class AdvancedJSONEncoder Advanced JSON encoder.
Class BinaryNullPayloadConverter Converter for 'binary/null' payloads supporting None values.
Class BinaryPlainPayloadConverter Converter for 'binary/plain' payloads supporting bytes values.
Class BinaryProtoPayloadConverter Converter for 'binary/protobuf' payloads supporting protobuf Message values.
Class CompositePayloadConverter Composite payload converter that delegates to a list of encoding payload converters.
Class DataConverter Data converter for converting and encoding payloads to/from Python values.
Class DefaultPayloadConverter Default payload converter compatible with other Temporal SDKs.
Class EncodingPayloadConverter Base converter to/from single payload/value with a known encoding for use in CompositePayloadConverter.
Class JSONPlainPayloadConverter Converter for 'json/plain' payloads supporting common Python values.
Class JSONProtoPayloadConverter Converter for 'json/protobuf' payloads supporting protobuf Message values.
Class PayloadCodec Codec for encoding/decoding to/from bytes.
Class PayloadConverter Base payload converter to/from multiple payloads/values.
Function decode_search_attributes Decode API search attributes to values.
Function default Default data converter.
Function encode_search_attribute_values Convert search attribute values into a payload.
Function encode_search_attributes Convert search attributes into an API message.
Function value_to_type Convert a given value to the given type hint.
Class _FunctionTypeLookup Undocumented
Function _type_hints_from_func Extracts the type hints from the function.
Variable _default Undocumented
Variable _non_user_defined_callables Undocumented
Variable _sym_db Undocumented
def decode_search_attributes(api: temporalio.api.common.v1.SearchAttributes) -> temporalio.common.SearchAttributes: (source)

Decode API search attributes to values.

Parameters
api:temporalio.api.common.v1.SearchAttributesAPI message with search attribute values to convert.
Returns
temporalio.common.SearchAttributesConverted search attribute values.
def default() -> DataConverter: (source)

Default data converter.

def encode_search_attribute_values(vals: temporalio.common.SearchAttributeValues) -> temporalio.api.common.v1.Payload: (source)

Convert search attribute values into a payload.

Parameters
vals:temporalio.common.SearchAttributeValuesList of values to convert.
def encode_search_attributes(attributes: temporalio.common.SearchAttributes, api: temporalio.api.common.v1.SearchAttributes): (source)

Convert search attributes into an API message.

Parameters
attributes:temporalio.common.SearchAttributesSearch attributes to convert.
api:temporalio.api.common.v1.SearchAttributesAPI message to set converted attributes on.
def value_to_type(hint: Type, value: Any) -> 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:TypeType hint to convert the value to.
value:AnyRaw value (e.g. primitive, dict, or list) to convert from.
Returns
AnyConverted value.
Raises
TypeErrorUnable to convert to the given hint.
def _type_hints_from_func(func: Callable) -> Tuple[Optional[List[Type]], Optional[Type]]: (source)

Extracts the type hints from the function.

Parameters
func:CallableFunction to extract hints from.
Returns
Tuple[Optional[List[Type]], Optional[Type]]Tuple containing parameter types and return type. The parameter types will be None if there are any non-positional parameters or if any of the parameters to not have an annotation that represents a class. If the first parameter is "self" with no attribute, it is not included.

Undocumented

_non_user_defined_callables = (source)

Undocumented

_sym_db = (source)

Undocumented