flytekit.get_reference_entity

flytekit.get_reference_entity(resource_type, project, domain, name, version, inputs, outputs)[source]

See the documentation for flytekit.reference_task and flytekit.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.

ref_entity = get_reference_entity(
    _identifier_model.ResourceType.WORKFLOW,
    "project",
    "dev",
    "my.other.workflow",
    "abc123",
    inputs=kwtypes(a=str, b=int),
    outputs={},
)
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