Any chance I can grab account and workspace_id out...
# ask-community
p
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
What Python object do you mean?
p
any python object... is there an execution context or something passed in?
z
PREFECT_API_URL
has your account and workspace id in it
PREFECT_UI_URL
will get you the URL for the UI with similar context
🙌 1
p
Thanks Zanie!
z
np, these are available at
prefect.settings
and require you to call
.value()
to get the actual value instead of the setting object.
p
So settings.PREFECT_UI_URL.value() should spit out: https://app.prefect.cloud/account/account_UUID/workspace/workspace_UUID
z
Yeah