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.2.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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for readchar_readpass-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b482b3c0312319f4a1e54dfd8b6257f738ab0e012f381479e03ebf7b7ffa5a25
MD5 0434976d1f9751da20c89c2dbfe6eb1a
BLAKE2b-256 e8001b253cc341d9761bfef1e743d774c31debebaa041ba4812849426e14b216

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for readchar_readpass-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f33e8c044512099509b6a1ddf5dac261a657359d37380148f2e908d542c3f9fe
MD5 6d9f2d92a860641f1c4146f9d7de074e
BLAKE2b-256 98fa6ef54d5c76d57cc548e1146a4003db518e9eba6aa99cba8b5178a647f182

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