https://prefect.io logo
Title
m

Mario Vormstein

01/16/2023, 2:22 PM
I have a quick questions about tags. I see that I can add a tag to a task via the
@task
decorator and I can see in the UI that a flow can have tags as well. But the
@flow
decorator does not have such an option?
Never mind, found it , but could be documented more clearly and mentioned here: https://docs.prefect.io/concepts/flows/#flow-runs
from prefect import tags
with tags("db", "blue"):
    my_flow("foo")
Actually, decorating works as well
@tags("test")
@flow(name="test name)
def do():
  pass
🙌 1
a

Anna Geller

01/16/2023, 4:22 PM
Wow, TMYK thanks for sharing - I didn't know that adding this tags decorator works And well found - tags are applied to a flow run, not deployment