How can I organize my flows based on my business logic or team structure?

Prefect 2.0

Tags provide a flexible and highly customizable way of organizing your flows, tasks, and deployments:

Does it mean that my work queue needs to have all those tags?

No. If you create a work queue with tag dev and the same tag is one of the tags set on a deployment, it’s enough for the work queue to pick that up.

How to set tags?

Deployment CLI

prefect deployment build --name deployment_name \
--tag dev --tag your_team --tag your_project


The easiest way to set those is by using your deployment YAML manifest:

  - dev
  - project1
  - ml-team
  - yourname


To set those programmatically, you can leverage the tags argument in a @task decorator:

@task(tags=["project_name", "team_name"])

Prefect 1.0

You can deploy your flows to various projects. Each project can refer to a different topic, team, environment, or business unit in your organization. You can create a project either from the UI or using the CLI:

prefect create project "project_name"
1 Like