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 usershow: 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
- Project on PyPI: pypi.org/project/secure-input/
- Telegram: @Swezy
📝 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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| secure_input-1.1.3.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secure_input-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
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
|