https://prefect.io logo
Title
a

Abhinav Chordia

05/05/2023, 1:11 PM
I’m a bit confused by the tags filter in the UI. It doens’t seem to filter flows with tasks with that tag. Are there tags on flows?
1
n

nicholas

05/05/2023, 1:44 PM
Hi @Abhinav Chordia - which tags filter are you referring to?
a

Abhinav Chordia

05/05/2023, 2:54 PM
This one on the main dash
n

nicholas

05/05/2023, 2:56 PM
Got it - apologies for the confusion; that filters for tags on flow runs only
a

Abhinav Chordia

05/05/2023, 3:03 PM
How do I add tags to flows?
I’ve tried looking in the docs but I can’t find anything about tags on flows
Ok it looks like tags are only available to deployments.
I cant find anything that allows tags directly on flows. @nicholas Please correct me if I’m wrong.
n

nicholas

05/05/2023, 4:12 PM
That’s correct - flows aren’t taggable but flow runs and deployments are
a

Abhinav Chordia

05/05/2023, 4:23 PM
If I’m running a flow locally by just executing a python script, how do I tag it?
n

nicholas

05/05/2023, 4:31 PM
You can do something like this:
from prefect import tags

with tags("tag-1", "tag-2"):
  my_flow()
a

Abhinav Chordia

05/05/2023, 4:36 PM
sweet that’s exactly what I was looking
🎉 1