Skip to main content

Надоела скучная консоль и сложный парсинг? Скачивай toolsan!(обязательно прочти README.md)

Project description

# 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.

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.

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.

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.

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

📅 date()

Smart date templating. Replace placeholders with real values.

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()).

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).

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.

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.

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.

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

📊 statlib()

Fetches PyPI download statistics for any package.

ts.statlib("toolsan")

🌀 loadspin()

Displays a loading spinner animation.

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

📈 progress_bar()

A simple progress bar for loops.

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

🏃 marquee()

Creates a scrolling marquee effect.

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

🖼️ frame() (coming soon)

Prints a beautiful box around text.

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

⏳ countdown()

A visual countdown timer.

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

🎨 bgcolor()

Fills the entire screen with a background color.

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

🌀 animate()

Animates a list of items at a given speed.

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

💓 pulse()

Pulses the screen background.

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

🧘 zen()

Prints the Zen of 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! 🚀


---

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toolsan-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolsan-0.2.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file toolsan-0.2.0.tar.gz.

File metadata

  • Download URL: toolsan-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for toolsan-0.2.0.tar.gz
Algorithm Hash digest
SHA256 98e6215f9d2933eb81d6f2cccac55b82482d1871a541089e8dcb901903d0b642
MD5 3d504b898f4de061db584d8946ca336a
BLAKE2b-256 e0b13c1ad8d2d27492e216086ab737833fad76c63a007f0bc5c8dd482eee08c9

See more details on using hashes here.

File details

Details for the file toolsan-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: toolsan-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for toolsan-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 218239666ac1c3e6f68430fd53783ea620d5e926644de676b86dbb6b2b426be6
MD5 85a22f5be74e6ffa701b1d2b13f364db
BLAKE2b-256 a97779768d20664cefe0008bc49dbea873cd62c41c35b20e4a555e4e1e8fe568

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page