Hello, is there any way to get the Flow name from ...
# ask-community
d
Hello, is there any way to get the Flow name from within a running task?
prefect.context.get_run_context()
returns a TaskRunContext when triggered from a running task which does not have Flow name. Thanks!
Copy code
from prefect.context import FlowRunContext

#call from within task method
FlowRunContext.get().flow.name
unsure if this is safe