Reference entities#
- class flytekit.get_reference_entity(resource_type, project, domain, name, version, inputs, outputs)#
See the documentation for
flytekit.reference_task
andflytekit.reference_workflow
as well.This function is the general form of the two aforementioned functions. It’s better for programmatic usage, as the interface is passed in as arguments instead of analyzed from type annotations.
- Parameters:
resource_type (int) – This is the type of entity it is. Must be one of
flytekit.models.core.identifier.ResourceType
project (str) – The project the entity you’re looking for has been registered in.
domain (str) – The domain the entity you’re looking for has been registered in.
name (str) – The name of the registered entity
version (str) – The version the entity you’re looking for has been registered with.
inputs (Dict[str, Type]) – An ordered dictionary of input names as strings to their Python types.
outputs (Dict[str, Type]) – An ordered dictionary of output names as strings to their Python types.
- Returns:
- class flytekit.LaunchPlanReference(project, domain, name, version)#
A reference object containing metadata that points to a remote launch plan.
- Parameters:
project (str)
domain (str)
name (str)
version (str)
- class flytekit.TaskReference(project, domain, name, version)#
A reference object containing metadata that points to a remote task.
- Parameters:
project (str)
domain (str)
name (str)
version (str)
- class flytekit.WorkflowReference(project, domain, name, version)#
A reference object containing metadata that points to a remote workflow.
- Parameters:
project (str)
domain (str)
name (str)
version (str)
- class flytekit.reference_task(project, domain, name, version)#
A reference task is a pointer to a task that already exists on your Flyte installation. This object will not initiate a network call to Admin, which is why the user is asked to provide the expected interface. If at registration time the interface provided causes an issue with compilation, an error will be returned.
Example:
- Parameters:
project (str)
domain (str)
name (str)
version (str)
- Return type:
Callable[[Callable[[…], Any]], ReferenceTask]
- class flytekit.reference_workflow(project, domain, name, version)#
A reference workflow is a pointer to a workflow that already exists on your Flyte installation. This object will not initiate a network call to Admin, which is why the user is asked to provide the expected interface. If at registration time the interface provided causes an issue with compilation, an error will be returned.
Example:
- Parameters:
project (str)
domain (str)
name (str)
version (str)
- Return type:
Callable[[Callable[[…], Any]], ReferenceWorkflow]
- class flytekit.reference_launch_plan(project, domain, name, version)#
A reference launch plan is a pointer to a launch plan that already exists on your Flyte installation. This object will not initiate a network call to Admin, which is why the user is asked to provide the expected interface via the function definition.
If at registration time the interface provided causes an issue with compilation, an error will be returned.
- Parameters:
project (str) – Flyte project name of the launch plan
domain (str) – Flyte domain name of the launch plan
name (str) – launch plan name
version (str) – specific version of the launch plan to use
- Return type:
Callable[[Callable[[…], Any]], ReferenceLaunchPlan]