Riya Sinha
02/13/2025, 11:10 PMMarvin
02/13/2025, 11:10 PMtags
context manager to apply tags to flow runs. Here is a basic example:
python
from prefect import flow, tags
TAG_NAME = "example-tag"
@flow
def my_flow():
# Your flow logic here
pass
if __name__ == "__main__":
with tags(TAG_NAME):
my_flow()
In this example, the flow run for my_flow
will be tagged with "example-tag"
. This can be useful for organizing and managing flow runs, especially when dealing with concurrency limits or triggering downstream processes based on tags.
For more detailed examples, you can refer to this GitHub example.Riya Sinha
02/13/2025, 11:12 PMMarvin
02/13/2025, 11:13 PM