I'm trying to set `PREFECT_API_URL` programmatica...
# ask-community
f
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
with prefect.settings.temporary_settings would work
👍 1
f
I want to set it globally for my python app during the runtime, does this contextmanager support that?
z
Then you should set it with an environment variable before entering the app
The settings are not intended to be mutated without a context
👍 3
You could also mutate the environment variable before importing Prefect if you really want to do it from Python