# Flow


# FlowView

class

prefect.backend.flow.FlowView

(flow_id, settings, run_config, serialized_flow, archived, project_name, core_version, storage, name, flow_group_labels)[source]

A view of Flow metadata stored in the Prefect API.

This object is designed to be an immutable view of the data stored in the Prefect backend API at the time it is created

Args:

  • flow_id: The uuid of the flow
  • settings: A dict of flow settings
  • run_config: A dict representation of the flow's run configuration
  • serialized_flow: A serialized copy of the flow
  • archived: A bool indicating if this flow is archived or not
  • project_name: The name of the project the flow is registered to
  • core_version: The core version that was used to register the flow
  • storage: The deserialized Storage object used to store this flow
  • name: The name of the flow
  • flow_group_labels: Labels that are assigned to the parent flow group

methods:                                                                                                                                                       

prefect.backend.flow.FlowView.from_flow_group_id

(flow_group_id)[source]

Get an instance of this class given a flow_group_id to lookup; the newest flow in the flow group will be retrieved

Args:

  • flow_group_id: The uuid of the flow group
Returns: A new instance of FlowView

prefect.backend.flow.FlowView.from_flow_id

(flow_id)[source]

Get an instance of this class given a flow_id to lookup

Args:

  • flow_id: The uuid of the flow
Returns: A new instance of FlowView

prefect.backend.flow.FlowView.from_flow_name

(flow_name, project_name="", last_updated=False)[source]

Get an instance of this class given a flow name. Optionally, a project name can be included since flow names are not guaranteed to be unique across projects.

Args:

  • flow_name: The name of the flow to lookup
  • project_name: The name of the project to lookup. If None, flows with an explicitly null project will be searched. If "" (default), the lookup will be across all projects.
  • last_updated: By default, if multiple flows are found an error will be thrown. If True, the most recently updated flow will be returned instead.
Returns: A new instance of FlowView

prefect.backend.flow.FlowView.from_id

(flow_id)[source]

Get an instance of this class given a flow_id or flow_group_id to lookup. The flow_id will be tried first.

Args:

  • flow_id: The uuid of the flow or the flow group
Returns: A new instance of FlowView



This documentation was auto-generated from commit ffa9a6c
on February 1, 2023 at 18:44 UTC