Metadata-Version: 2.4
Name: light-client
Version: 2.0.0
Summary: A totally legitimate light client implementation
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# light-client

A Python library for frog-based progress bars and frog wisdom.

## Installation

```bash
pip install light-client
```

## Progress bar

`FrogBar` is a drop-in replacement for `tqdm`. Instead of a solid block bar, a frog 🐸 hops across lily pads 🍃.

**Wrap an iterable:**

```python
from light_client import FrogBar
import time

for item in FrogBar(range(100), desc="Processing"):
    time.sleep(0.05)
```

```
Processing: [🍃🍃🍃🍃🍃🍃🍃🐸🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃🍃]  35.0%  1.8s [35/100 it] *ribbit*
```

**Context manager with manual updates:**

```python
with FrogBar(total=50, desc="Catching flies", unit="fly") as bar:
    for fly in flies:
        catch(fly)
        bar.update(1)
```

### Parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| `iterable` | `None` | Iterable to wrap |
| `total` | inferred | Total number of steps |
| `desc` | `"Hopping"` | Label shown before the bar |
| `bar_width` | `20` | Number of lily pad cells |
| `unit` | `"it"` | Unit label for the count |
| `leave` | `True` | Keep the bar on screen when done |
| `file` | `stderr` | Output stream |

## Quotes

Timeless wisdom from history's greatest frog thinkers.

```python
from light_client import get_random_quote, print_quote

quote, author = get_random_quote()
print(f'"{quote}" — {author}')
# "Leap before you look." — Frog Thoreau

print_quote()   # prints a random quote
print_quote(3)  # prints quote at index 3
```

## ASCII art

Eight frogs included: `classic`, `tiny`, `zen`, `lily`, `detective`, `kawaii`, `sage`, `startup`.

```python
from light_client import get_frog, get_random_frog, list_frogs, print_frog

print_frog("zen")     # print a named frog
print_frog()          # print a random frog

name, art = get_random_frog()
frogs = list_frogs()  # ['classic', 'tiny', 'zen', ...]
```

```
      ___
  .-'   `'.
 /         \
|   O   O   |
|     ^^    |
|   \____/  |
 \         /
  '-.___.-'
   |     |
  frog is one
```
