https://prefect.io logo
t

Tim Enders

10/24/2022, 9:13 PM
Hmmm... how would I get the flow name while inside a flow in Prefect 2.0? Is that still something in a context somewhere?
1
z

Zanie

10/24/2022, 9:13 PM
get_run_context().flow_run.name
might do it
t

Tim Enders

10/24/2022, 9:21 PM
do I need to import something for
get_run_context
? I don't seem to have it available in a pdb session.
z

Zanie

10/24/2022, 9:49 PM
Yeah, sorry:
from prefect.context import get_run_context
t

Tim Enders

10/24/2022, 10:11 PM
thank you!