Registry / auth-security / pwinput

pwinput

JSON →
library1.0.3pypypi✓ verified 86d ago

A cross-platform Python module that displays **** for password input. Works on Windows, unlike getpass. Formerly called stdiomask. Current version: 1.0.3, maintained by Al Sweigart, stable with low release cadence.

pip install pwinput
INSTALL
IMPORT
SIG · PWINPUT
P
pwinput
auth-securitypythonv1.0.3
Install
3.1s avg
Import
11ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.1s · import 0.010s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pwinput
import pwinput
Direct import of the module; main function is pwinput.pwinput()
pwinput function
pwinput.pwinput()
from stdiomask import getpass or import stdiomask
Library was renamed from stdiomask to pwinput; old imports will fail
mask input
pwinput.pwinput(prompt='Password: ')
pwinput.getpass(prompt='Password: ')
No getpass function; use pwinput()

Simple password input with asterisks masking.

import pwinput password = pwinput.pwinput(prompt='Password: ') print('You entered:', password)
Debug
Known issues
breakingLibrary renamed from stdiomask to pwinput. All old imports (import stdiomask) will break.
fix
Update imports to import pwinput and use pwinput.pwinput() instead of stdiomask.maskinput() or getpass.
affects: <=0.1 (stdiomask) to >=1.0.0
gotchapwinput() returns the entered password as a string; it does not echo newline on some terminals? Actually it does print newline. But be aware that if you call pwinput() without prompt, prompt defaults to 'Password: '.
fix
Use pwinput.pwinput(prompt='Enter your password: ') to customize.
affects: all
gotchaOn some systems, masking character may not be asterisk if locale or terminal doesn't support Unicode. It uses '*' by default.
fix
Pass mask='•' to change character.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'stdiomask'
Library was renamed from stdiomask to pwinput.
fix
pip install pwinput and change import to import pwinput.
AttributeError: module 'pwinput' has no attribute 'getpass'
pwinput() is the main function; there is no getpass function.
fix
Use pwinput.pwinput() instead.
ValueError: The 'stream' argument is not supported by pwinput().
Some users try to pass a stream argument similar to getpass.getpass.
fix
pwinput does not support stream; remove that argument.
Upgrade
Version history
1.0.3latest on PyPI · released Feb 16, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
pwinput — pip install pwinput · libregistry