Skip to main content

A password reader.

Project description

getpassword

A small Python utility for reading masked password input from the terminal.

This project provides a simple get_password() helper that accepts user input one character at a time, prints * for each keystroke, and supports backspace editing.

Features

  • Reads a password from the terminal without showing the raw characters
  • Displays * for each character typed
  • Supports backspace to correct mistakes
  • Minimal dependency footprint

Installation

This project includes packaging metadata in pyproject.toml, so it can be installed with:

pip install getpassword

For local development from the repository, install in editable mode:

python -m pip install -e .

If you prefer a normal local install:

python -m pip install .

The package dependency readchar will be installed automatically.

Usage

from getpassword import get_password

password = get_password("Password: ")
print("You entered", password)

You can also run the script directly from the repository:

python src/getpassword/getpassword.py

Project structure

  • src/getpassword/getpassword.py - core password input implementation
  • src/getpassword/__init__.py - package entrypoint exposing get_password

Dependency

  • readchar

Notes

This package is intended for simple console-based password entry. It does not provide advanced terminal handling or cross-platform terminal abstraction beyond the readchar dependency.

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

readchar_readpass-0.1.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

readchar_readpass-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file readchar_readpass-0.1.1.tar.gz.

File metadata

  • Download URL: readchar_readpass-0.1.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for readchar_readpass-0.1.1.tar.gz
Algorithm Hash digest
SHA256 47d75f6f22c28830a6584ca9b6905e883f08a3715ff55cda39a8118dace80941
MD5 955310a11a59a22e7c78b22a2d6b873e
BLAKE2b-256 a173fc96e91a83f137a7b604fa40f20dbcb7267e09d077af673d7b5fbb68482a

See more details on using hashes here.

File details

Details for the file readchar_readpass-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for readchar_readpass-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6123ba64c9525cbcb44c10a86c4bc4c6dd3c353f889c7fb28a881e495d402e83
MD5 be70eec05a91c970778153b0def63599
BLAKE2b-256 c61812da02a23cb1fd727440ecb5de2304ef86bf9648e10cf45f82949906781e

See more details on using hashes here.

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