PWInput
A cross-platform Python module that displays **** for password input. Formerly called stdiomask.
Installation
To install with pip, run:
pip install pwinput
Quickstart Guide
The getpass.getpass() function in the Python Standard Library won't display "mask" characters as you type; it only displays nothing as you type. If you want mask characters to appear, you can use the pwinput.pwinput() function instead.
Typical usage:
>>> import pwinput
>>> pwinput.pwinput() # Show * for each typed character.
Password: *********
'swordfish'
>>> pwinput.pwinput(prompt='PW: ') # Show a custom prompt.
PW: *********
'swordfish'
>>> pwinput.pwinput(mask='X') # Show a different character when user types.
Password: XXXXXXXXX
'swordfish'
>>> pwinput.pwinput(mask='') # Don't show anything when user types (falls back and calls getpass.getpass()).
Password:
'swordfish'
Contribute
If you'd like to contribute to pwinput, check out https://github.com/asweigart/pwinput
Support
If you find this project helpful and would like to support its development, consider donating to its creator on Patreon.
Metadata
Release files for pwinput 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pwinput-1.0.3.tar.gz | 4.4 kB | Without provenance | Details for pwinput-1.0.3.tar.gz |
Release files / pwinput-1.0.3.tar.gz
| Download URL | pwinput-1.0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca1a8bd06e28872d751dbd4132d8637127c25b408ea3a349377314a5491426f3
|
|
BLAKE2b-256 checksum How to use checksums |
4bc9f6d03c2214c282251baa38c6be08f5b9f81f1ea488716cd2335e7e190b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Security for pwinput 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.