Skip to main content
Environment variables can be used to configure a function’s runtime environment.

Configuration

client.run() accepts environment variables through the env_vars dictionary:
Literal values, including numeric settings, must be provided as strings.
Reserved environment variable names include PYTHONPATH, LOG_LEVEL, and names beginning with OUTERPRODUCT_ or OTEL_. Calls that specify reserved names through env_vars are rejected with an invalid_argument error.
client.map() also accepts env_vars, and applies the specified environment variables to every call it creates.

Using secrets

env_vars also accepts stored OuterProduct Secrets as values:
At runtime, OuterProduct resolves the Secret and supplies its value to the environment as HF_TOKEN. In order to be available at runtime, the Secret must already exist, and the caller must have permission to access its value. Secrets can be created in the OuterProduct UI or through the Python API. See Secrets for more information on creation and access management.