Skip to main content

Secure Password Input

Project description

standard (3)

PyPI Python Telegram
PyPI
Leave a ⭐ if you like this repository


🚩 What is secure_input?

secure_input is a tiny, dependency-free Python package that provides a secure, user-friendly way to prompt for sensitive input (like passwords) in terminal applications. It supports masking (e.g. *) and aims to be simple to use and easy to drop into any script.


🚀 Installation

Install from PyPI:

pip install secure-input

PyPI: https://pypi.org/project/secure-input/


🧩 Quick usage

from secure_input import secure_input

password = secure_input("Enter your Password: ", show="*")
print("You entered:", password)

secure_input(prompt: str, show: str) -> str

  • prompt: text shown to the user
  • show: masking character (e.g. "*")

📚 Features

  • Easy Usage
  • Optional masking character for input
  • Cross-platform terminals supported

⚠️ Notes & Limitations

  • Non-ASCII characters (e.g. Ö Ä Ü ß) may not be handled correctly — use plain ASCII letters, numbers and symbols for best results.
  • Always validate and handle the secret data securely in your application (do not print or log real passwords in production).

🧪 Examples

A short interactive example:

from secure_input import secure_input

api_key = secure_input("API Key: ", show="*")
if len(api_key) == 0:
    print("No key provided")
else:
    print("Key received (length):", len(api_key))

📦 Where to get help


📝 License

Distributed under the MIT License — see LICENSE for details.


👤 Maintainer & Contact


Made with ❤️ — If you find this useful, please leave a ⭐ on the repo

Star History Chart

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

secure_input-1.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

secure_input-1.1.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file secure_input-1.1.2.tar.gz.

File metadata

  • Download URL: secure_input-1.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for secure_input-1.1.2.tar.gz
Algorithm Hash digest
SHA256 b4b9b9c66caa811f46d8e9a00beae4df906350d7553104315c6d8917b533cadd
MD5 371ede23421824340dc3afb451e44575
BLAKE2b-256 ea4381bbf1046aba7bbc6bad070b11a0244f794f2c7526811622ec74d3359866

See more details on using hashes here.

File details

Details for the file secure_input-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: secure_input-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for secure_input-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37175695b522de2cd96d72598359e4243070e85843a0c6001e6b3630f28d41c1
MD5 cc9c7c5074555652e19b3f9758288d89
BLAKE2b-256 6badc35c75155c6fc07e913db4aa11e55ecca0e537318fedb28e40492ba494a5

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