flytekit.extend.TypeEngine

class flytekit.extend.TypeEngine(*args, **kwds)[source]

Core Extensible TypeEngine of Flytekit. This should be used to extend the capabilities of FlyteKits type system. Users can implement their own TypeTransformers and register them with the TypeEngine. This will allow special handling of user objects

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__()

Initialize self.

get_available_transformers()

Returns all python types for which transformers are available

get_transformer(python_type)

literal_map_to_kwargs(ctx, lm, python_types)

Given a literal Map (usually an input into a task - intermediate), convert to kwargs for the task

named_tuple_to_variable_map(t)

register(transformer)

This should be used for all types that respond with the right type annotation when you use type(…) function

to_literal(ctx, python_val, python_type, …)

to_literal_type(python_type)

to_python_value(ctx, lv, expected_python_type)