Skip to main content

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

Metadata

Release files for secure-input 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secure-input 1.1.3
File Size Uploaded Provenance Actions
secure_input-1.1.3.tar.gz 3.4 kB Without provenance Details for secure_input-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secure-input 1.1.3
File Interpreter ABI Platform Actions
secure_input-1.1.3-py3-none-any.whl Python 3 none any Details for secure_input-1.1.3-py3-none-any.whl

Total release size: 6.9 kB

Release files / secure_input-1.1.3.tar.gz

Download URL secure_input-1.1.3.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64e55f88f78d7365f8debff8dbcf7c5d584371326a82867dd80c744c2d06c46e
BLAKE2b-256 checksum
How to use checksums
86fe057d859b055d0247ac3ed6d3df2681f50bbc36a439889783b77ffa02ff56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.0

Release files / secure_input-1.1.3-py3-none-any.whl

Download URL secure_input-1.1.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1ccd05cf165e43a044c3103c973774273e295e5f47cb7eb61607ba69b9401b5
BLAKE2b-256 checksum
How to use checksums
50f385facdc35c111b6cc08c8c7c35fb7bb82bc6eb90381f6f91cf8dc4f057da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.0

Security for secure-input 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page