Skip to main content

secrets

Access secrets stored in the Fused backend for the current kernel.

import fused

# Access a secret by name
api_key = fused.secrets['MY_API_KEY']

Overview

fused.secrets is a SecretsManager object that provides access to secrets stored in your Fused account. Secrets are accessed as attributes using dot notation.

Secrets can be managed in Workbench Settings under the "Secrets" tab, or via the API.

Usage

Accessing secrets

import fused

@fused.udf
def udf():
# Access a secret by name
api_key = fused.secrets['OPENAI_API_KEY']

# Use the secret
import openai
client = openai.OpenAI(api_key=api_key)
...

Security notes

  • Secrets are stored encrypted in the Fused backend
  • Secrets are only accessible within UDFs running on Fused infrastructure
  • Secrets are scoped to your account/organization
  • Never log or return secret values from UDFs

See also