Skip to main content

SecretManager

This class provides an interface for managing secrets. It defines a single method, Get, which retrieves a secret given a context and a key.

Methods


Get()

@classmethod
def Get(
ctx: context.Context,
key: string
) - > string

Retrieves a secret value associated with a given key. Callers use this to securely access sensitive configuration or credentials.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
keystringThe identifier for the secret to retrieve.

Returns

TypeDescription
stringThe secret value as a string, or an error if the secret cannot be retrieved.