# Task Run
prefect.backend.task_run.TaskRunView(task_run_id, task_id, task_slug, name, state, map_index, flow_run_id)[source]
A view of Task Run data stored in the Prefect API.
Provides lazy loading of task run return values from Prefect
This object is designed to be an immutable view of the data stored in the Prefect backend API at the time it is created.
task_run_id: The task run uuid
task_id: The uuid of the task associated with this task run
task_slug: The slug of the task associated with this task run
name: The task run name
state: The state of the task run
map_index: The map index of the task run. Is -1 if it is not a mapped subtask, otherwise it is in the index of the task run in the mapping
flow_run_id: The uuid of the flow run associated with this task run
Get an instance of this class; query by task run id
prefect.backend.task_run.TaskRunView.from_task_slug(task_slug, flow_run_id, map_index=-1)[source]
Get an instance of this class; query by task slug and flow run id.
Get the a new copy of this object with the latest data from the API. Cached result objects will be passed to the new object.
The result of this task run loaded from the
Iterate over the results of a mapped task, yielding a
This documentation was auto-generated from commit ffa9a6c
on February 1, 2023 at 18:44 UTC