<@ULVA73B9P> How can I access Prefect environment ...
# ask-marvin
j
@Marvin How can I access Prefect environment variables within my code?
m
To access Prefect environment variables within your code, you can use the Prefect Python SDK. You can interact with variables using methods like
get
,
set
, and
unset
. These methods can be used synchronously in a standard Python context or asynchronously in an asynchronous context. Environment variables in Prefect are prefixed with
PREFECT_
and take precedence over other configuration sources, making them useful for temporary overrides or session-specific settings. For more details, you can refer to the Prefect documentation on variables and settings and profiles.