Skip to content

secrets.read

Bases: ABC

read(key, scope=None, redacted=True) abstractmethod

Read a secret value for the given key and optional scope

Parameters:

Name Type Description Default
key str

The key name of the secret to read

required
scope Optional[str]

Optional scope/namespace for the secret

None
redacted bool

Whether to redact value instead of actual secret

True

Returns:

Name Type Description
string str

The secret value or redacted version if redacted is True