stdiomask
raw JSON → 0.0.6 verified Fri May 01 auth: no python
A cross-platform Python module for entering passwords to a stdio terminal and displaying a **** mask, which getpass cannot do. Current version 0.0.6, released 2019-07-23. No recent updates; stable, minimal API.
pip install stdiomask Common errors
error AttributeError: module 'stdiomask' has no attribute 'getpass' ↓
cause Incorrect import or module not installed.
fix
Install stdiomask: pip install stdiomask, then import stdiomask and use stdiomask.getpass().
Warnings
deprecated stdiomask.getpass() is superseded by getpass.getpass() in Python 3.10+ which supports masking via the 'pass' parameter. However, stdiomask provides cross-platform compatibility for older Python versions. ↓
fix Use built-in getpass.getpass(prompt='Password: ', stream=None) if masking not required, or continue using stdiomask.
Imports
- getpass wrong
import getpass getpass.getpass()correctimport stdiomask stdiomask.getpass()
Quickstart
import stdiomask
password = stdiomask.getpass(prompt='Password: ')
print('You entered:', password)