pyinput-cli
The definitive input handler for your python cli programs.
pyinput-cli is a package that provides functions to handle user input in a consistent way across any project.
- get_str: reads a string and can validate its length or its format as a name.
- get_num: reads an integer or float and validates minimum and maximum values.
- yes_no: asks a yes/no question and returns the boolean result.
Example usage
from pyinput import get_num, get_str, yes_no
name = get_str("Name: ", name=True, max_length=30)
age = get_num("Age: ", min_val=0, max_val=120)
continue_ = yes_no("Continue?")
print(name, age, continue_)
Notes
- Empty strings are rejected by default for
get_str. get_numrejects invalid input and values outside the configured bounds.- The functions are designed for small interactive CLI flows and can be reused in larger projects.
Metadata
Release files for pyinput-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyinput_cli-0.1.1.tar.gz | 4.3 kB | Without provenance | Details for pyinput_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinput_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pyinput_cli-0.1.1-py3-none-any.whl |
Total release size: 9.5 kB
Release files / pyinput_cli-0.1.1.tar.gz
| Download URL | pyinput_cli-0.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a02fc8048e8ec62ba327e31d1c40be2e12428b8f1c24b6d71e83899f1ce19096
|
|
BLAKE2b-256 checksum How to use checksums |
3b19b0f6a4d15b1975016ff5ca8b8bc09602bd0db127e64a4db875f02744e9e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / pyinput_cli-0.1.1-py3-none-any.whl
| Download URL | pyinput_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b7f642c5fe8533fdcc9ebefde90ff7329438b1cd852fb1b43e9ec39708a6656
|
|
BLAKE2b-256 checksum How to use checksums |
741e698918b8e040fb09c70ccd499e7f13c4e743b49739505f0f7e4db8b524e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for pyinput-cli 0.1.1
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.