Secret data¶
Utility types for working with secret data.
Using these types ensures that their values don’t end up in error messages
or logs. This also causes yuio.io.ask() to use special widgets that don’t
print entered text:
- class yuio.secret.SecretValue(data: T)¶
A simple wrapper that prevents inner value from accidentally leaking to logs or messages: it returns
"***"when converted to string viastr()orrepr().- data: T¶
Secret data.
- type yuio.secret.SecretString = SecretValue[str]¶
Convenience alias for secret strings.