Metadata-Version: 2.3
Name: mini-tqdm
Version: 0.1.1
Summary: A small progress bar for Python loops
Keywords: progress,progressbar,tqdm,cli,iterator
Author: Sami Ullah
Author-email: Sami Ullah <samiullah.su@outlook.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# mini-tqdm

A small progress bar for Python loops. Wraps any list, range, or generator and prints
a live bar with elapsed time, ETA, and iteration rate.

![demo](https://raw.githubusercontent.com/samiternity/mini-tqdm/main/demo.gif)

## Install

```bash
pip install mini-tqdm
```

## Usage

```python
from mini_tqdm import MiniTqdm
import time

# Basic list
for item in MiniTqdm(range(100), desc="Training"):
    time.sleep(0.05)

# Generator with explicit total
def stream():
    yield from range(50)

for item in MiniTqdm(stream(), total=50, desc="Loading"):
    time.sleep(0.05)

# Silence the bar without changing call sites
for item in MiniTqdm(range(100), disable=True):
    time.sleep(0.05)
```

**Output:**
```
Training: [████████████--------] 60/100 | Elapsed: 3.0s | ETA: 2.0s | 20.00it/s
```

## Parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| `iterable` | required | any iterable |
| `total` | `None` | explicit total for generators; inferred via `len()` if omitted |
| `desc` | `""` | label prefix shown before the bar |
| `disable` | `False` | pass `True` to suppress all output |
| `file` | `sys.stderr` | where to write the bar |

When `total` is unknown, mini-tqdm shows a spinner and running count instead of a bar.

## License

MIT
