Metadata-Version: 2.4
Name: pyinput-cli
Version: 0.1.1
Summary: A package for managing user input through the cli, and consistently across projects.
Author-email: Pedro Alberto Rosquete Ares <rosquetearespedro06@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Pedro Alberto Rosquete Ares
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Documentation, https://github.com/prares-dev/pyinput-cli.git
Project-URL: Homepage, https://github.com/prares-dev/pyinput-cli.git
Project-URL: Repository, https://github.com/prares-dev/pyinput-cli.git
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# 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

```python
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.
