semvec/pypi-packages huggingface dataset:
torchbox 1.1.41
A PyTorch Toolbox.
License: MIT
Keywords: PyTorch, Machine Learning, Signal Processing, Deep Learning

# torchbox

The [torchlib](https://github.com/antsfamily/torchlib) package is deprecated.

You can install and test ``torchbox`` by: ``pip install torchbox``, ``import torchbox as tb``, ``print(tb.__version__)``

Please see [torchbox's documentation](http://iridescent.ink/torchbox) for using details.
askput 0.1.5
Simple and safe console input validation for Python
License: MIT
Requires Python: >=3.8
Keywords: input, validation, console, cli, user-input, type-checking, input-validation, beginner-friendly, safe-input, askput

# askput

**askput** is a lightweight Python library for safe, validated, and interactive console input.

It removes repetitive input-validation logic and helps you build clean, readable CLI programs with minimal effort.

---

## Why askput?

Python’s built-in `input()`:

- always returns strings  
- provides no validation  
- leads to repeated `try / except` blocks  

askput offers a clean abstraction over these problems while staying simple and dependency-free.

---

## Features

- Integer and float input with bounds
- String length validation
- Email validation
- Secure password input
- Strong password rules
- Yes/No confirmations
- Phrase-based confirmation for dangerous actions
- Menu-based choice selection
- Regex (pattern) based input
- Multiple values input
- Fully tested with `pytest`
- Zero external dependencies

---

## Installation

``` bash
pip install askput
```

Usages
---
Basic Usage
---
```python

from askput import ask

age = ask.int("Enter age", min=18)
price = ask.float("Enter price", min=0)
name = ask.string("Enter name", min_len=2)
email = ask.email("Enter email")

print(age, price, name, email)
```
Passwords and Confirmations
---
```python
from askput import ask

age = ask.int("Enter age", min=18)
price = ask.float("Enter price", min=0)
name = ask.string("Enter name", min_len=2)
email = ask.email("Enter email")

print(age, price, name, email)

```
```python
from askput import ask

password = ask.password("Enter password")
strong_password = ask.password_strong("Create strong password")

confirm = ask.confirm("Continue?")
delete = ask.confirm_phrase("Type DELETE to continue", "DELETE")

```
Choice / Menu Input
---

```python
from askput import ask

role = ask.choice(
    "Select role",
    ["Admin", "User", "Guest"]
)

print("Selected role:", role)
```
##Pattern and Multiple Input
---
```python
from askput import ask

code = ask.pattern("Enter code", r"^[A-Z]{3}\d{3}$")
tags = ask.multi("Enter tags (comma separated)")

print(code, tags)
```
Example: Simple CLI Flow
---
```python
from askput import ask

role = ask.choice("Role", ["Admin", "User"])
age = ask.int("Age", min=18)
password = ask.password_strong("Password")

if ask.confirm("Submit form?"):
    print("Form submitted")
```
Testing
---
askput is fully tested using pytest.

```bash
pytest
```

All tests are before every release.