Metadata-Version: 2.4
Name: format_input
Version: 0.1.0
Summary: A Python library for dynamically formatting and processing input
Author-email: GabbaTK <gabiteok+pypi@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/GabbaTK/Format-Input/
Project-URL: Issues, https://github.com/GabbaTK/Format-Input/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Format Input

`Format Input` is a small Python library for parsing console or text-stream input
according to a compact format specification. Instead of repeatedly calling
`input()`, splitting strings, and converting values by hand, describe the shape
of each input line once and receive typed Python values.

It is useful for:

- Competitive programming problems with predictable, line-based input.
- Command-line tools that read structured text.
- Small scripts that need to convert input into integers, floats, and strings.
- Situations where input may contain a mixture of scalar values, lists, and
  values followed by free-form text.

For example, instead of manually splitting and converting a line:

```python
parts = input().split()
count = int(parts[0])
ratio = float(parts[1])
name = parts[2]
```

You can describe the input once and receive typed values directly:

```python
count, ratio, name = format_input("int float str")
```

See [USAGE.MD](./USAGE.MD) for all supported types and format specifications.

## Requirements

- Python 3.10 or newer
- No third-party dependencies

## Installation

Clone the repository:

```bash
git clone https://github.com/GabbaTK/Format-Input.git
cd Format-Input
```

The package is stored in `src/`. To run the test suite from the repository root:

```bash
PYTHONPATH=src python -m unittest discover -s tests -v
```

## License

This project is available under the [MIT License](./LICENSE).

## AI disclosure

No AI was used in the making of the code.
