Any chance I can grab account and workspace_id out of a python object easily? I'm doing error flows and I want to dynamically build the cloud url in every workspace without adding new configuration
✅ 1
z
Zanie
03/06/2023, 6:28 PM
What Python object do you mean?
p
Peter
03/06/2023, 6:28 PM
any python object... is there an execution context or something passed in?
z
Zanie
03/06/2023, 6:29 PM
PREFECT_API_URL
has your account and workspace id in it
Zanie
03/06/2023, 6:30 PM
PREFECT_UI_URL
will get you the URL for the UI with similar context
🙌 1
p
Peter
03/06/2023, 6:31 PM
Thanks Zanie!
z
Zanie
03/06/2023, 6:32 PM
np, these are available at
prefect.settings
and require you to call
.value()
to get the actual value instead of the setting object.
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.