skytext 0.1.0
Beautiful & Blazing-Fast Colored Terminal Output for Python
License: Apache License 2.0

**skytext** brings vibrant console output to your Python projects: smooth true-color gradients, rainbow text, typewriter animations, and styled messages — now **up to 50× faster** on gradients thanks to the optional native `gradient.so` or `gradient.pyd` extension.

## Features

- Smooth RGB gradients (native-accelerated)
- Rainbow text effect
- Typewriter animation
- Styled messages: `success()`, `error()`, `warning()`, `info()`, `title()`
- Full 24-bit color support on all modern terminals
- Zero-config Windows/Linux compatibility

## Package Structure

```
skytext/
├── __init__.py          # Imports & exposes public API
├── skytext.py            # Core ANSI escape code generator
├── animated.py          # Typewriter effect
├── styles.py            # success(), error(), etc.
├── constants.py         # Color constants (RED, GREEN, ...)
├── gradient.py          # ← Pure-Python gradient (always available as fallback)
├── gradient.so          # ← Native compiled extension for Linux (optional, auto-built)
├── gradient.pyd          # ← Native compiled extension for Windows (optional, auto-built)
```

**How it works:**
- At import time, `skytext` tries to load the ultra-fast `gradient.so` or `gradient.pyd`.
- If the extension is missing or fails to load (e.g., unsupported platform), it **seamlessly falls back** to the pure-Python `gradient.py`.
- You get maximum speed when possible — zero hassle otherwise.

## Installation

```bash
pip install skytext
```

## Quick Start

```python
from skytext import *

print_animated("Hello, world!", (255, 100, 200))
print_gradient("Blazing-fast gradient!", (255, 0, 0), (0, 255, 255))
print_rainbow("RAINBOW POWER!")
success("Done!")
error("Failed!")
```

## Performance

| Text length       | Pure Python (`gradient.py`) | Native (`gradient.so` or `gradient.pyd`) |
|-------------------|-----------------------------|-------------------------|
| 1,000 chars       | ~10 ms                      | **~0.4 ms**             |
| 10,000 chars      | ~95 ms                      | **~3.5 ms**             |
| 100,000 chars     | ~900 ms                     | **~30 ms**              |

Perfect for real-time CLI animations and massive logs.

## API Reference

| Function                | Description                                      | Key Parameters                     |
|-------------------------|--------------------------------------------------|------------------------------------|
| `print_animated(text)` | Typewriter animation                             | `color`, `speed` (default 0.03)   |
| `print_gradient(text)`  | Smooth linear RGB gradient                       | `start_color`, `end_color`         |
| `print_rainbow(text)`   | Classic rainbow effect                           | —                                  |
| `success(text)`         | Bold green success message                       | —                                  |
| `error(text)`           | Bold red error message                           | —                                  |
| `warning(text)`         | Bold yellow warning                              | —                                  |
| `info(text)`            | Bright cyan info message                         | —                                  |
| `title(text)`           | Bold cyan title                                  | —                                  |
| `print_color()`         | Low-level colored print (alias: `cprint`)        | `fg`, `bg`, `style`, `end`         |

All color parameters accept `(r, g, b)` tuples with values 0–255.

## Why skytext?

- Minimal dependencies
- Optional native speed boost with graceful fallback
- Works everywhere: scripts, Jupyter, CLI tools
- Clean, fully type-annotated code

## Contributing

Contributions are welcome! Open issues or PRs anytime.

## License

MIT License

---
⭐ Star the repo if you like fast, beautiful terminals!