Remote Access

This module provides utilities for performing operations on tasks, workflows, launchplans, and executions, for example, the following code fetches and executes a workflow:

# create a remote object from flyte config and environment variables
FlyteRemote(config=Config.auto())
FlyteRemote(config=Config.auto(config_file=....))
FlyteRemote(config=Config(....))

# Or if you need to specify a custom cert chain
# (options and compression are also respected keyword arguments)
FlyteRemote(private_key=your_private_key_bytes, root_certificates=..., certificate_chain=...)

# fetch a workflow from the flyte backend
remote = FlyteRemote(...)
flyte_workflow = remote.fetch_workflow(name="my_workflow", version="v1")

# execute the workflow, wait=True will return the execution object after it's completed
workflow_execution = remote.execute(flyte_workflow, inputs={"a": 1, "b": 10}, wait=True)

# inspect the execution's outputs
print(workflow_execution.outputs)

Entrypoint

FlyteRemote

Main entrypoint for programmatically accessing a Flyte remote backend.

Options

These are options that can be configured for a launchplan during registration or overridden during an execution.

Entities

FlyteTask

A class encapsulating a remote Flyte task.

FlyteWorkflow

A class encapsulating a remote Flyte workflow.

FlyteLaunchPlan

A class encapsulating a remote Flyte launch plan.

Entity Components

FlyteNode

A class encapsulating a remote Flyte node.

FlyteTaskNode

A class encapsulating a task that a Flyte node needs to execute.

FlyteWorkflowNode

A class encapsulating a workflow that a Flyte node needs to execute.

Execution Objects

FlyteWorkflowExecution

A class encapsulating a workflow execution being run on a Flyte remote backend.

FlyteTaskExecution

A class encapsulating a task execution being run on a Flyte remote backend.

FlyteNodeExecution

A class encapsulating a node execution being run on a Flyte remote backend.