Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asweigart/pwinput
A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask.
https://github.com/asweigart/pwinput
Last synced: about 2 months ago
JSON representation
A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask.
- Host: GitHub
- URL: https://github.com/asweigart/pwinput
- Owner: asweigart
- License: mit
- Created: 2021-09-12T18:56:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-17T10:41:51.000Z (6 months ago)
- Last Synced: 2024-07-19T15:32:47.830Z (2 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 36
- Watchers: 5
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
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](https://www.patreon.com/AlSweigart).