@Marvin we need flow_run|ui_url parameter inside the prefect flow, how we can acheive this?
m
Marvin
02/06/2025, 8:17 AM
To access the
ui_url
parameter of a flow run within a Prefect 3.x flow, you can utilize the
prefect.runtime.flow_run
module. Here's how you can retrieve the `ui_url`:
Copy code
python
from prefect import flow
from prefect.runtime.flow_run import ui_url
@flow
def my_flow():
print(f"Flow run UI URL: {ui_url}")
my_flow()
This will print the UI URL for the flow run, allowing you to access it programmatically within your flow.
For further details, you can explore the Prefect documentation or the Prefect runtime module.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.