Metadata-Version: 2.4
Name: tha-utils-helper
Version: 0.1.0
Summary: A Tabular Helper utility library with general-purpose helpers for the tha-* ecosystem.
License: MIT
Keywords: chunks,helpers,list,utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# tha-utils-helper

[![CI](https://github.com/tha-guy-nate/tha-utils-helper/actions/workflows/ci.yml/badge.svg)](https://github.com/tha-guy-nate/tha-utils-helper/actions/workflows/ci.yml)

A small Python utility library with general-purpose helpers for the `tha-*` ecosystem. No dependencies, no classes — just functions.

## Install

```bash
pip install tha-utils-helper
```

## Quick start

```python
from tha_utils_helper import chunk_list

chunk_list([1, 2, 3, 4, 5], 2)
# [[1, 2], [3, 4], [5]]
```

## API

### `chunk_list(lst, size)`

```python
chunk_list(lst: list[T], size: int) -> list[list[T]]
```

Splits `lst` into consecutive chunks of `size`. The final chunk may be smaller if the list doesn't divide evenly. Raises `ValueError` if `size < 1`.

```python
chunk_list([1, 2, 3, 4, 5], 2)   # [[1, 2], [3, 4], [5]]
chunk_list([1, 2, 3], 3)          # [[1, 2, 3]]
chunk_list([], 5)                  # []
```

## License

MIT
