Skip to main content

mukimov

Tiny cross-platform Python library: password prompt that shows * for each typed character — like getpass(), but with visual feedback.

from mukimov import stars

password = stars("Password: ")
print(password)

Terminal:

Password: ********

password contains the real text ("12345678"), only * are shown on screen.

Features

  • Only standard library, zero dependencies
  • Windows (msvcrt) + Linux/macOS (termios/tty)
  • Each character is immediately replaced with *
  • Backspace correctly deletes the last *
  • Enter finishes input
  • Real password is never printed
  • Ctrl+C → KeyboardInterrupt, Ctrl+D on empty input → EOFError
  • Falls back to getpass (no echo) when stdin is not a TTY (pipes, IDE, CI)

Install

pip install .

For development:

pip install -e .[test]  # or: pip install -e . && pip install pytest
pytest -q

Usage

from mukimov import stars

username = input("Username: ")
password = stars("Password: ")

print(username)
Username: mukimov
Password: ********

Custom mask character:

password = stars("Password: ", mask="#")

More examples — each typed character is echoed with your symbol, but the returned value is always the real password:

from mukimov import stars

password = stars("Password: ")       # input 12345 -> shows: Password: *****
password = stars("Password: ", "/")  # input 12345 -> shows: Password: /////
password = stars("Secret: ", "#")    # input hello -> shows: Secret: #####
password = stars("Password: ", "•")  # unicode masks work too

mask must be exactly one character, otherwise ValueError is raised:

stars("Password: ", "")    # ValueError: mask must be exactly one character
stars("Password: ", "/*")  # ValueError: mask must be exactly one character

Build & publish to PyPI

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*

Test PyPI first:

python -m twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ mukimov

License

MIT

Release files for mukimov 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mukimov 0.1.1
File Size Uploaded
mukimov-0.1.1.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mukimov 0.1.1
File Interpreter ABI Platform
mukimov-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / mukimov-0.1.1.tar.gz

Download URL mukimov-0.1.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
897cd779bec089279eb37c487082158627e445c834c4f9d5171554244f3add73
BLAKE2b-256 checksum
How to use checksums
5515141d117995e7e36c1f407130df09a60dcca22bef21a3cab676ab2dff5591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / mukimov-0.1.1-py3-none-any.whl

Download URL mukimov-0.1.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7e24488ddaa07bd3aee8f12646672bc706c7ca14e7fb5ede69f26bfaa352cf7
BLAKE2b-256 checksum
How to use checksums
bd912fc4740a80246d0f35676e9a86eb177282f07761011b3a65f5a1923d9ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page