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.

Source Distribution

stdiomask-0.0.6.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file stdiomask-0.0.6.tar.gz.

File metadata

  • Download URL: stdiomask-0.0.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for stdiomask-0.0.6.tar.gz
Algorithm Hash digest
SHA256 c1e47069ead9e10bda150a26f7922ca01d2adc503042a9d7acf64877a2b9a3a6
MD5 1219b14c39ea578ff968c8497ccdfa0d
BLAKE2b-256 47a2f72fd263cecb11ed4cc96bd31608359e1df30349c665674e5c35ea9a72d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page