prefect.runtime.flow_run
¶
Access attributes of the current flow run dynamically.
Note that if a flow run cannot be discovered, all attributes will return empty values.
You can mock the runtime attributes for testing purposes by setting environment variables
prefixed with PREFECT__RUNTIME__FLOW_RUN
.
Available attributes
id
: the flow run's unique IDtags
: the flow run's set of tagsscheduled_start_time
: the flow run's expected scheduled start time; defaults to now if not presentname
: the name of the flow runflow_name
: the name of the flowflow_version
: the version of the flowparameters
: the parameters that were passed to this run; note that these do not necessarily include default values set on the flow function, only the parameter values explicitly passed for the runparent_flow_run_id
: the ID of the flow run that triggered this run, if anyparent_deployment_id
: the ID of the deployment that triggered this run, if anyrun_count
: the number of times this flow run has been run