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

Uploaded Python 3

File details

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

File metadata

  • Download URL: readchar_readpass-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e7442a71940a2e41c63162f74244cdfee033b150310423ef99dad445fe2b19aa
MD5 a5e63b1647e8d83bc6e9cc1e511c87e6
BLAKE2b-256 47ae33679aab3f9582f08bdee895dbeaee18e034f5930a8b9ea85204f479eb09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for readchar_readpass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9020c766fd5fc5ab0bce708fabb7d129ad53ca514f1b04f858f019a92e6042b
MD5 940568c49fdf3d3113dd3463926db875
BLAKE2b-256 2785596720f2ca71a2400f5d44edf2439735d07144952dcc7963b52545dc242e

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