PyDocs

Command-line interface libraries

getpass

not WASI

Utilities to get a password and/or the current user name.

getpass(prompt[, stream[, echo_char]]) - Prompt for a password, with echo
turned off and optional keyboard feedback.
getuser() - Get the user name from the environment or password database.

GetPassWarning - This UserWarning is issued when getpass() cannot prevent
                 echoing of the password contents while reading.

On Windows, the msvcrt module will be used.
Symbols in getpass

g

getpass
Prompt for a password, with echo turned off.
GetPassWarning
A UserWarning subclass issued when password input may be echoed.
getuser
Get the username from the environment or password database.