flytekit.extend.DictTransformer¶
-
class
flytekit.extend.
DictTransformer
[source]¶ Transformer that transforms a univariate dictionary Dict[str, T] to a Literal Map or transforms a untyped dictionary to a JSON (struct/Generic)
Methods
__init__
()Initialize self.
dict_to_generic_literal
(v)get_dict_types
(t)Return the generic Type T of the Dict
get_literal_type
(t)Converts the python type to a Flyte LiteralType
to_literal
(ctx, python_val, python_type, …)Converts a given python_val to a Flyte Literal, assuming the given python_val matches the declared python_type.
to_python_value
(ctx, lv, expected_python_type)Converts the given Literal to a Python Type.
Attributes
name
python_type
This returns the python type
type_assertions_enabled
Indicates if the transformer wants type assertions to be enabled at the core type engine layer