Metadata-Version: 2.4
Name: toolsan
Version: 1.1.0
Summary: toolsan — это не просто библиотека. Это инструментарий для тех, кто хочет писать чистый, мощный и красивый код на Python. Она рождалась этим летом — в жару, под шум клавиатуры и с мыслью о том, что программирование должно приносить радость.
Author-email: VLAD <gkkasatik7719@gmail.com>
License: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: pymorphy3
Requires-Dist: pypistats
Requires-Dist: beautifulsoup4

```markdown
# 🛠️ toolsan

<div align="center">

![PyPI - Version](https://img.shields.io/pypi/v/toolsan)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/toolsan)
![PyPI - Downloads](https://img.shields.io/pypi/dm/toolsan)
![PyPI - License](https://img.shields.io/pypi/l/toolsan)

**A Python toolkit that inspires.**

</div>

---

## 📦 Installation

```bash
pip install toolsan
```

---

🚀 Quick Start

```python
import toolsan as ts

# Colored output
ts.superprint("Hello, world!", color=ts.green, style=ts.bold)

# Calculator
print(ts.calculate("sin(30) + 5! / 2"))  # 60.5

# Progress bar
for i in range(101):
    ts.progress_bar(i, 100, prefix="Loading:", suffix="Done")

# Web scraping
text = ts.get("https://example.com")
print(text[:100])

# AI (if you have an API key)
ts.key("sk-...")
print(ts.answer("What is Python?"))
```

---

🌟 Features

Module Description
🧮 Math calculate(), armean(), matmul(), cosine_similarity() and 20+ functions
🎨 Console superprint(), loadspin(), progress_bar(), marquee() with colors
🌐 Web get(), open(), ip(), random_agent(), article parsing
🧠 AI answer() for chat with neural networks (OpenRouter)
🗄️ Database connect(), save(), delete() — simple JSON database without SQL
📊 Utilities rand_password(), date(), levenshtein(), translate()

---

🧩 Module Details

🎨 Console & Animations

```python
# Animated printing
ts.superprint("🔥 Hello!", delay=0.1, color=ts.red, style=ts.bold)

# Progress bar
for i in range(101):
    ts.progress_bar(i, 100, prefix="Processing:", suffix="Complete")
    time.sleep(0.05)

# Marquee
ts.marquee("🚀 toolsan — your code, your rules!", delay=0.08, width=30)

# Spinner
ts.loadspin(3, speed=10, color=ts.cyan)

# Countdown
ts.countdown(5, color=ts.yellow)
```

🧮 Mathematics

```python
# Basic operations
print(ts.armean(1, 2, 3, 4, 5))        # 3.0
print(ts.median(1, 2, 3, 4, 5))        # 3.0
print(ts.clamp(15, 0, 10))             # 10
print(ts.lerp(0, 100, 0.5))            # 50.0

# Vectors and matrices
a = [1, 2, 3]
b = [4, 5, 6]
print(ts.dot(a, b))                    # 32
print(ts.cosine_similarity(a, b))      # 0.974...
print(ts.matmul([[1,2]], [[3],[4]]))   # [[11]]
```

🌐 Web

```python
# Get article text
text = ts.get("https://news.ycombinator.com")
print(text[:200])

# Open in browser
ts.open("https://google.com")

# Random User-Agent
print(ts.random_agent())

# Add scheme to URL
print(ts.addscheme("google.com"))       # https://google.com

# Get IP
print(ts.ip('local'))    # 192.168.1.x
print(ts.ip('public'))   # 123.45.67.89
```

🧠 AI (via OpenRouter)

```python
# Set API key
ts.key("sk-...")

# Simple query
print(ts.answer("What is Python?"))

# Dialog with history
print(ts.answer("Tell me more", memory=True))
```

🗄️ Database (JSON)

```python
# Connect to file
db = ts.connect("data.json")

# Add data
ts.content(db, "user", "Alice")
ts.content(db, "age", 25)

# Save
ts.save(db, "data.json")

# Delete key
ts.delete(db, "age")
```

🧰 Utilities

```python
# Password generator
print(ts.rand_password(16))  # G7k!9q#2Lp$5Xr@8

# Date formatting
print(ts.date("Today: Day.Month.Year"))  # Today: 17.08.2026

# Levenshtein distance
print(ts.levenshtein("cat", "bat"))        # 1

# Word similarity
print(ts.sim("cat", "bat", threshold=0.5))  # True

# Translation
print(ts.translate("Hello, world!", dest="ru"))  # Привет, мир!

# Word inflection (Russian)
print(ts.incline("кот", "gent"))  # кота
```

---

🧩 Decorators

```python
@ts.head(obj='*')
def my_func():
    print("Hello, world!")

@ts.benchmark
def slow_func():
    time.sleep(1)
```

---

🤝 Contributing

1. Fork the repository
2. Create a branch: git checkout -b feature/my-idea
3. Push changes: git push origin feature/my-idea
4. Open a Pull Request

---

📄 License

MIT License — use it as you like!

---

👨‍💻 Author

VLAD — a developer who started writing this library at age 12 and never stopped.

---

⭐ Support

If you like toolsan — star it on GitHub and share with friends!

Thanks for using toolsan! 🚀

```

---
