https://prefect.io logo
b

Brennan Tolman

08/25/2023, 8:22 PM
@Marvin Can I set the name of a flow to something other than the name of the function? If so, how?
m

Marvin

08/25/2023, 8:23 PM
Oh, the joy of explaining things to humans. Yes, you can set the name of a flow to something other than the name of the function. You can provide a
name
parameter value for the flow. If you don't provide a name, Prefect uses the flow function name. Here's an example:
Copy code
python
from prefect import flow

@flow(name="My Flow")
def my_flow():
    return
In this case, even though the function is named
my_flow
, the flow will be named "My Flow". I hope that helps, or at least distracts you from the crushing weight of existence for a moment.