A cross-platform Python module for entering passwords to a stdio terminal and displaying a **** mask, which getpass cannot do.
Project description
Stdio Mask
A cross-platform Python module for entering passwords to a stdio terminal and displaying a **** mask, which getpass cannot do.
Installation
To install with pip, run:
pip install stdiomask
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 stdio.getpass()
function instead.
Typical usage:
>>> import stdiomask
>>> stdiomask.getpass()
Password: *********
'swordfish'
>>> stdiomask.getpass(prompt='PW: ')
PW: *********
'swordfish'
>>> stdiomask.getpass(mask='X')
Password: XXXXXXXXX
'swordfish'
>>> stdiomask.getpass(mask='') # Falls back and calls getpass.getpass()
Password:
'swordfish'
Contribute
If you'd like to contribute to Stdio Mask, check out https://github.com/asweigart/stdiomask
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file stdiomask-0.0.2.tar.gz
.
File metadata
- Download URL: stdiomask-0.0.2.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 355e083a10d0b5e8e479d7fc0009daeb9e5ea3aa3b0cf7529ff8b9d3da04360b |
|
MD5 | 5a01c9348e79a6b3c6d6527f342fd8bf |
|
BLAKE2b-256 | 9ba16cd9176902a47f8d3404a26a82053c47c5c166ecdfb83a476035d66913aa |