Join Slack
Powered by
I'm trying to set `PREFECT_API_URL` programmatica...
# ask-community
f
Farhood Etaati
06/07/2023, 6:43 PM
I'm trying to set
PREFECT_API_URL
programmatically in my python code but I can't, is there any example regarding this?
✅ 1
z
Zanie
06/07/2023, 6:46 PM
with prefect.settings.temporary_settings would work
👍 1
f
Farhood Etaati
06/07/2023, 6:51 PM
I want to set it globally for my python app during the runtime, does this contextmanager support that?
z
Zanie
06/07/2023, 6:51 PM
Then you should set it with an environment variable before entering the app
Zanie
06/07/2023, 6:52 PM
The settings are not intended to be mutated without a context
👍 3
Zanie
06/07/2023, 6:53 PM
You could also mutate the environment variable
before
importing Prefect if you really want to do it from Python
73
Views
Open in Slack
Previous
Next