Skip to main content

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_num rejects 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.0

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

Source distribution (sdist)

Source distribution for pyinput-cli 0.1.0
File Size Uploaded Provenance Actions
pyinput_cli-0.1.0.tar.gz 4.3 kB Without provenance Details for pyinput_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyinput-cli 0.1.0
File Interpreter ABI Platform Actions
pyinput_cli-0.1.0-py3-none-any.whl Python 3 none any Details for pyinput_cli-0.1.0-py3-none-any.whl

Total release size: 9.4 kB

Release files / pyinput_cli-0.1.0.tar.gz

Download URL pyinput_cli-0.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6fc1ea4472142eeb851e158b8f53d8f0a1a0778877013651537bfabefb5da2d4
BLAKE2b-256 checksum
How to use checksums
52475db71825d67bf9aec69f7e362188aeb0668c632cd86826eff767302e6b4f
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.0-py3-none-any.whl

Download URL pyinput_cli-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18621c36af4862d1c4e2ea0bb7d8bd0aa666b7856e6f4deaf51590279bf1239f
BLAKE2b-256 checksum
How to use checksums
fe584d73a7106fc8fa9171e6637bf63623887c38131fcd4f6092eae819b6053f
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.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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