Metadata-Version: 2.4
Name: tqdm-tag
Version: 0.1.0
Summary: Enhance tqdm progress bars by assigning tags and colors to iterations.
Project-URL: Documentation, https://github.com/Colin Moldenhauer/tqdm-tag#readme
Project-URL: Issues, https://github.com/Colin Moldenhauer/tqdm-tag/issues
Project-URL: Source, https://github.com/Colin Moldenhauer/tqdm-tag
Author-email: Colin Moldenhauer <colin.moldenhauer@posteo.de>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Requires-Dist: numpy
Requires-Dist: tqdm
Description-Content-Type: text/markdown

# tqdm-tag
Enhance tqdm progress bars by assigning tags and colors to iterations.

## Usage
```python
from tqdm_tag import tqdm_status

N = 100
for _ in (pbar := tqdm_status(
    range(N),
    total=N,
)):
    if _ == 1: pbar.set_tag("warn", "yellow")   # add new tag
    if _ == 30: pbar.set_tag("warn")            # reuse tag
    if _ == 90: pbar.set_tag("error", "red")    # add another tag
```

**Example 2:** change color upon completion
```python
import time
from tqdm_tag import tqdm_status

N = 10
for _ in (pbar := tqdm_status(
    range(N),
    total=N,
    colour="red",
)):
    time.sleep(.2)
    if _ == N-1: pbar.set_tag("default", "green")
```

**Example 3:** pre-defined error class
```python
from tqdm_tag import tqdm_error

N = 100
for _ in (pbar := tqdm_error(
    range(N),
    total=N,
)):
    if _ == 1: pbar.warn()
    if _ == 30: pbar.error(color="red")
```

# TODO: screenshots/videos
