secrets
Access team secrets stored in the Fused backend. Team secrets are scoped to the execution environment and shared across your team or organization. Requires a paid plan.
@fused.udf
def udf():
api_key = fused.secrets["MY_API_KEY"]
...
Overview
fused.secrets is a SecretsManager object that provides access to team secrets stored in your Fused account. Secrets can be accessed by name using bracket notation or dot notation.
Secrets can be managed in Workbench under Integrations & secrets, or programmatically via the SDK.
Usage
Accessing secrets
@fused.udf
def udf():
api_key = fused.secrets["OPENAI_API_KEY"]
import openai
client = openai.OpenAI(api_key=api_key)
...
Managing secrets
@fused.udf
def udf():
fused.secrets["MY_KEY"] = "value"
del fused.secrets["MY_KEY"]
dir(fused.secrets)
Security notes
- Team secrets are accessible by anyone in your team
- Secrets are stored encrypted in the Fused backend
- Never log or return secret values from UDFs
See also
fused.user_secretsfor user-owned secrets that persist across environments- Secrets Management for a full guide on storing, accessing, and securing secrets
- Cloud Storage for connecting to cloud providers