Secret
class Secret(value: str | None = None)
Categories: credentials
Reference to a secret value, used for credential fields.
A Secret is either hydrated -- Secret("hunter2"), whose
value() returns the value -- or dehydrated -- Secret(),
whose value() raises. None is the dehydrated sentinel and is
never a valid value. It always serializes to the redacted marker
":secret:", so the value never lands in the serialized form and
str(secret) is always redacted.
Parameters
parameter
valuestr | None