Skip to main content

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.

Files for stdiomask, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size stdiomask-0.0.5.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page