Skip to main content

A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask. (custom fork by Eoleedi

Project description

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.

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

pwinput_eoleedi-1.0.3.post1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwinput_eoleedi-1.0.3.post1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pwinput_eoleedi-1.0.3.post1.tar.gz.

File metadata

  • Download URL: pwinput_eoleedi-1.0.3.post1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pwinput_eoleedi-1.0.3.post1.tar.gz
Algorithm Hash digest
SHA256 a5c3cec21c33a1ea0b8edaa57741a92e17f1d18638f62fa0ea7ade06f9902e28
MD5 139781e142de4e08027e4b7f6bf5bd40
BLAKE2b-256 a72ca695f6494ea20bd47e227f0de297bd5b0ad20cf6b38fd8153765d32ea3ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwinput_eoleedi-1.0.3.post1.tar.gz:

Publisher: python-publish.yml on eoleedi/pwinput

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pwinput_eoleedi-1.0.3.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pwinput_eoleedi-1.0.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 a44f9338ff9947041e3ff13e80b8d8712bb4c725be1d0bfda518c8b384137935
MD5 bde3b0aef766dfb80e72733a6f9a111d
BLAKE2b-256 80033b98c77a21e2fe6cf4e6926858e9da1d9659b88079248c616e90c09d5fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pwinput_eoleedi-1.0.3.post1-py3-none-any.whl:

Publisher: python-publish.yml on eoleedi/pwinput

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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