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.3.tar.gz (3.4 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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secure_input-1.1.3.tar.gz
  • Upload date:
  • Size: 3.4 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.3.tar.gz
Algorithm Hash digest
SHA256 64e55f88f78d7365f8debff8dbcf7c5d584371326a82867dd80c744c2d06c46e
MD5 dff45c549a5f050e4718213babb9fce7
BLAKE2b-256 86fe057d859b055d0247ac3ed6d3df2681f50bbc36a439889783b77ffa02ff56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: secure_input-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b1ccd05cf165e43a044c3103c973774273e295e5f47cb7eb61607ba69b9401b5
MD5 ef0eb957f7ba99fa305fead8fb09d721
BLAKE2b-256 50f385facdc35c111b6cc08c8c7c35fb7bb82bc6eb90381f6f91cf8dc4f057da

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