semvec/pypi-packages huggingface dataset:
snakebar 0.1.1
A tqdm-like progress bar that snakes across your terminal via a random space-filling curve.
License: MIT
Requires Python: >=3.9

# snakebar

A tqdm-like progress bar that fills your terminal with a one-character-thick snake along a random space-filling curve. Based on https://observablehq.com/@esperanc/random-space-filling-curves

## Installation
```bash
pip install snakebar
```

## Usage

### Basic Python usage

Using `snake_bar` as a drop-in replacement for tqdm:
```python
from snakebar import snake_bar
for i in snake_bar(range(100)):
    # your code here
    pass
```

Using `SnakeBAR` for manual progress bar updates:
```python
from snakebar import SnakeBAR
with SnakeBAR(total=100) as pbar:
    for i in range(100):
        # your code here
        pbar.update(1)
```

### CLI usage

You can also use the `snakebar` command line interface:

```bash
snakebar -n 5000 --desc "Processing" --sleep 0.05
```

Options:
- `-n`, `--total`: Total number of steps (default 100)
- `--desc`: Description text to show alongside the progress bar
- `--sleep`: Time in seconds to sleep between steps (simulates work)