SecretTag
mininterface.tag.SecretTag
Contains a secret value that should be masked in the UI.
from mininterface import run, Tag
from mininterface.tag import SecretTag
m = run()
out = m.form({
"My password": SecretTag("TOKEN"),
})
print(out)
# {'My password': 'TOKEN'}
show_toggle: bool = True
Toggle visibility button (eye icon)
__hash__()
Make SecretTag hashable for use with Annotated
toggle_visibility()
Toggle the masked state
__repr__()
Ensure secrets are not accidentally exposed in logs/repr