- class flytekit.extend.Interface(inputs=None, outputs=None, output_tuple_name=None, docstring=None)#
A Python native interface object, like inspect.signature but simpler.
inputs (Optional[Dict[str, Union[Type, Tuple[Type, Any]], None]]) – Map of input name to either a tuple where the first element is the python type, and the second value is the default, or just a single value which is the python type. The latter case is used by tasks for which perhaps a default value does not make sense. For consistency, we turn it into a tuple.
output_tuple_name (Optional[str]) – This is used to store the name of a typing.NamedTuple when the task or workflow returns one. This is also used as a proxy for better or for worse for the presence of a tuple return type, primarily used when handling one-element NamedTuples.
docstring (Optional[Docstring]) – Docstring of the annotated @task or @workflow from which the interface derives from.
- __init__(inputs=None, outputs=None, output_tuple_name=None, docstring=None)#
__init__([inputs, outputs, ...])
- param outputs
Output variables and their types as a dictionary
This method is useful in removing some variables from the Flyte backend inputs specification, as these are implicit local only inputs or will be supplied by the library at runtime.
Use this to add additional inputs to the interface.
This method allows addition of extra outputs are expected from a task specification