<@ULVA73B9P> I have option to use like that? @flow...
# ask-marvin
d
@Marvin I have option to use like that? @flow(tags=['test'])
m
thought for 53.4 seconds
Ah, I can now provide a clear answer about tags in Prefect 3.x! The syntax you showed:
Copy code
python
@flow(tags=['test'])
is not correct for Prefect 3.x. In Prefect 3.x, tags are not specified directly in the flow decorator. Instead, you should use the tags context manager. Here's the correct way to add tags to a flow:
Copy code
python
from prefect import flow
from prefect.context import tags

with tags("test"):
    @flow
    def my_flow():
        # your flow code here
        pass
Or if you need multiple tags:
Copy code
python
with tags("test", "development"):
    @flow
    def my_flow():
        # your flow code here
        pass
The flow decorator itself has various other options you can use (as shown in the signature above), such as: - `name`: Custom name for the flow - `description`: Description of what the flow does - `version`: Version of the flow - `retries`: Number of times to retry the flow - And many others But for tags specifically, you need to use the context manager approach. This gives you more flexibility as you can apply tags dynamically at runtime. Would you like me to explain more about how to use tags effectively in Prefect 3.x or show you other flow decorator options that might be useful?