0.1.dev2192+g7c539c3.d20250403

flytekit.core.class_based_resolver

Directory

Classes

Class Description
ClassStorageTaskResolver Stores tasks inside a class variable.

flytekit.core.class_based_resolver.ClassStorageTaskResolver

Stores tasks inside a class variable. The class must be inherited from at the point of usage because the task loading process basically relies on the same sequence of things happening.

class ClassStorageTaskResolver(
    args,
    kwargs,
)
Parameter Type
args *args
kwargs **kwargs

Methods

Method Description
add()
find_lhs()
get_all_tasks() Future proof method.
load_task() Given the set of identifier keys, should return one Python Task or raise an error if not found.
loader_args() This is responsible for turning an instance of a task into args that the load_task function can reconstitute.
name()
task_name() Overridable function that can optionally return a custom name for a given task.

add()

def add(
    t: flytekit.core.python_auto_container.PythonAutoContainerTask,
)
Parameter Type
t flytekit.core.python_auto_container.PythonAutoContainerTask

find_lhs()

def find_lhs()

get_all_tasks()

def get_all_tasks()

Future proof method. Just making it easy to access all tasks (Not required today as we auto register them)

load_task()

def load_task(
    loader_args: typing.List[str],
) -> flytekit.core.python_auto_container.PythonAutoContainerTask

Given the set of identifier keys, should return one Python Task or raise an error if not found

Parameter Type
loader_args typing.List[str]

loader_args()

def loader_args(
    settings: flytekit.configuration.SerializationSettings,
    t: flytekit.core.python_auto_container.PythonAutoContainerTask,
) -> typing.List[str]

This is responsible for turning an instance of a task into args that the load_task function can reconstitute.

Parameter Type
settings flytekit.configuration.SerializationSettings
t flytekit.core.python_auto_container.PythonAutoContainerTask

name()

def name()

task_name()

def task_name(
    t: flytekit.core.base_task.Task,
) -> typing.Optional[str]

Overridable function that can optionally return a custom name for a given task

Parameter Type
t flytekit.core.base_task.Task

Properties

Property Type Description
instantiated_in
lhs
location