Metadata-Version: 2.4
Name: toolsan
Version: 0.2.0
Summary: Надоела скучная консоль и сложный парсинг? Скачивай toolsan!(обязательно прочти README.md)
Author-email: VLAD <gkkasatik7719@gmail.com>
License: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown



```markdown
# toolsan — The All-in-One Python Console Power Tool

**toolsan** (Tools an Aid) is a lightweight yet powerful Python library that turns boring terminal output into a colorful, animated, and interactive experience.

With `toolsan` you can:
- print text letter‑by‑letter with colors, animations, and alignment
- translate text into almost any language
- format dates and times in seconds
- convert numbers to words in any language
- inflect Russian words by case
- generate random passwords
- parse mathematical expressions safely
- compare strings with fuzzy matching
- show loading spinners, progress bars, and marquee text
- fill the screen with color
- animate lists, count down, and pulse backgrounds
- access hundreds of emojis as variables
- check PyPI download statistics
- and more — all without external dependencies!

---

## 🚀 Installation

```bash
pip install toolsan
```

---

🎨 Colors, Styles & Alignment

All ANSI colors, backgrounds, and styles are available as variables.

Text Colors: black, red, green, yellow, blue, purple, cyan, white
Bright Colors: b_black, b_red, b_green, b_yellow, b_blue, b_purple, b_cyan, b_white
Background Colors: bg_black, bg_red, bg_green, bg_yellow, bg_blue, bg_purple, bg_cyan, bg_white
Bright Backgrounds: bg_b_black, bg_b_red, bg_b_green, bg_b_yellow, bg_b_blue, bg_b_purple, bg_b_cyan, bg_b_white
Text Styles: bold, italic, underline, strike
Alignment: left, center, right

---

😀 Emojis as Variables

Hundreds of emojis are built‑in. Just use them as variables.

```python
print(ts.smile, ts.heart, ts.coffee, ts.pizza, ts.cat, ts.rainbow)
```

---

📖 Full Function Reference

🎨 superprint()

Prints text letter‑by‑letter with delay, color, background, style, and alignment.

```python
ts.superprint("Hello, World!", delay=0.05, color=ts.green, style=ts.bold)
ts.superprint("Centered", side=ts.center, color=ts.yellow)
```

---

⌨️ smart_input()

Prints a prompt letter‑by‑letter and returns user input with type conversion.

```python
name = ts.smart_input("Enter your name: ", typ=str, delay=0.05, color=ts.cyan)
age = ts.smart_input("Age: ", typ=int)
```

---

🌐 translate()

Translates text using the free MyMemory API. Supports 100+ languages.

```python
print(ts.translate("Hello", dest='ru', src='en'))  # Привет
```

---

📅 date()

Smart date templating. Replace placeholders with real values.

```python
print(ts.date("Today is Day month Year"))   # Today is 20 June 2026
print(ts.date("Time: Hour:Minute"))         # Time: 14:30
```

Supported placeholders: Day, Month, Year, month, mon, yr, Hour, Minute, Second, Sec.

---

🔢 numeral()

Converts numbers to words in any language (via translate()).

```python
print(ts.numeral(42, 'en'))   # forty two
print(ts.numeral(42, 'ru'))   # сорок два
print(ts.numeral(42, 'ja'))   # 四十二
```

---

🧩 incline()

Inflects Russian words by grammatical case (uses pymorphy3).

```python
print(ts.incline("июнь", "gent"))     # июня
print(ts.incline("двадцать", "gent")) # двадцати
```

Supported cases: nomn, gent, datv, accs, ablt, loct.

---

🧮 calculate()

A safe math expression parser. Supports +, -, *, /, **, (), sin(), cos(), sqrt(), ln(), log(), ! (factorial), and constants π, e.

```python
print(ts.calculate("2 + 2 * 2"))      # 6
print(ts.calculate("5!"))             # 120
print(ts.calculate("sin(90)"))        # 1.0
```

---

🔍 sim()

Fuzzy string matching using Levenshtein distance. Returns True if similar.

```python
print(ts.sim("hello", "helo", 0.7))   # True
print(ts.sim("cat", "dog", 0.7))      # False
```

---

🔑 rand_password()

Generates a random password of specified length.

```python
print(ts.rand_password(12))  # e.g., "aB3#kL9!qZ2@"
```

---

📊 statlib()

Fetches PyPI download statistics for any package.

```python
ts.statlib("toolsan")
```

---

🌀 loadspin()

Displays a loading spinner animation.

```python
ts.loadspin(3, speed=10, color=ts.cyan)
```

---

📈 progress_bar()

A simple progress bar for loops.

```python
for i in range(101):
    ts.progress_bar(i, 100, prefix="Loading:", suffix="Done")
```

---

🏃 marquee()

Creates a scrolling marquee effect.

```python
ts.marquee("Welcome to toolsan!", delay=0.1, width=40, repeat=3)
```

---

🖼️ frame() (coming soon)

Prints a beautiful box around text.

```python
ts.frame("Hello, World!", color=ts.green)
```

---

⏳ countdown()

A visual countdown timer.

```python
ts.countdown(5, color=ts.red, style=ts.bold)
```

---

🎨 bgcolor()

Fills the entire screen with a background color.

```python
ts.bgcolor(ts.bg_red)
time.sleep(2)
ts.bgcolor()  # reset
```

---

🌀 animate()

Animates a list of items at a given speed.

```python
ts.animate(["⭐", "🌟", "✨"], seconds=3, speed=5, color=ts.yellow)
```

---

💓 pulse()

Pulses the screen background.

```python
ts.pulse(delay=0.1, bg_color=ts.bg_blue)
```

---

🧘 zen()

Prints the Zen of Python.

```python
ts.zen()
```

---

🔧 random_obj(), between(), flatten(), order(), wait(), integers_between(), around(), formatcheck()

Additional utilities for lists, randomization, and control flow.

---

📦 Dependencies

· pymorphy3 — for inflection (installed automatically)
· pypistats — for statistics (installed automatically)

All other functions work without external dependencies.

---

📄 License

MIT License

---

👤 Author

Vlad — creator of toolsan

---

🌟 Support

If you find this library useful, star it on GitHub — it really helps!

---

Enjoy your console work! 🚀

```

---

