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

Uploaded Python 3

File details

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

File metadata

  • Download URL: secure_input-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 26eb0b7378ea0daeefeaef15f441f4d6c1531298bf022c162729c571b08d0d2d
MD5 820e0aa4dbf28e2342b31073cc06c77f
BLAKE2b-256 1d6bf64c1db21a15e88f9043632d087871ad89fdcd9c6ef1daa338542d259fb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: secure_input-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81c2e8dbfff839a5b0406bdbc678036f2922ecd98385f16b617290db35bae340
MD5 a152464fa7817d5ac1cdb29cbc2146c2
BLAKE2b-256 f3d53b6672432d2e51d3af15072be666c9591159b1e903f68d76ac2c900569e5

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