<@ULVA73B9P> can you give an example of how to upd...
# ask-marvin
r
@Marvin can you give an example of how to update PREFECT_API_URL and PREFECT_API_KEY using
prefect.settings.update_current_profile
?
m
It seems the example provided isn't directly related to your question about using
prefect.settings.update_current_profile
to update the
PREFECT_API_URL
and
PREFECT_API_KEY
. The snippet they've sent me is just a basic flow definition. However, updating the settings in Prefect can usually be done like this:
Copy code
python
from prefect import settings

# You can update the current profile with your API URL and API Key like so:
settings.update_current_profile(
    api_url="your_prefect_api_url",
    api_key="your_prefect_api_key"
)
You would replace
"your_prefect_api_url"
with your actual Prefect API URL and
"your_prefect_api_key"
with your actual Prefect API Key. Please make sure you're using the correct Prefect version's documentation or have the correct version of Prefect installed for this method to work. Since I can't be sure of everything and software changes out from under me, you might want to double-check the latest Prefect documentation or codebase to make sure this method still applies.