No project description provided
Project description
mtly
- Библиотека для кастомизации текста
Быстрый старт
для установки просто напишите в терминале
pip install mtly
Примеры использования
Для начала нужно импортировать функцию motley, которая и будет выполнять всю работу
from mtly import motley
14 цветов, 3 цветовые комбинации и 3 стиля
Вы можете комбинировать их как зах хотите
from mtly import motley
print(motley(text="Все цвета:"))
print(f'{motley(text="green")}: {motley(text="Hello World", color="green")}')
print(f'{motley(text="dark_green")}: {motley(text="Hello World", color="dark_green")}')
print(f'{motley(text="light_blue")}: {motley(text="Hello World", color="light_blue")}')
print(f'{motley(text="blue")}: {motley(text="Hello World", color="blue")}')
print(f'{motley(text="dark_blue")}: {motley(text="Hello World", color="dark_blue")}')
print(f'{motley(text="yellow")}: {motley(text="Hello World", color="yellow")}')
print(f'{motley(text="orange")}: {motley(text="Hello World", color="orange")}')
print(f'{motley(text="pink")}: {motley(text="Hello World", color="pink")}')
print(f'{motley(text="dark_pink")}: {motley(text="Hello World", color="dark_pink")}')
print(f'{motley(text="red")}: {motley(text="Hello World", color="red")}')
print(f'{motley(text="purple")}: {motley(text="Hello World", color="purple")}')
print(f'{motley(text="dark_purple")}: {motley(text="Hello World", color="dark_purple")}')
print(f'{motley(text="grey")}: {motley(text="Hello World", color="grey")}')
print(f'{motley(text="black")}: {motley(text="Hello World", color="black")}')
print()
print(f'{motley(text="Все цветовые комбинации:")}')
print(f'{motley(text="fresh")}: {motley(text="Hello World", color_combo="fresh")}')
print(f'{motley(text="volcano")}: {motley(text="Hello World", color_combo="volcano")}')
print(f'{motley(text="night")}: {motley(text="Hello World", color_combo="night")}')
print()
print(f'{motley(text="Все стили:")}')
print(f'{motley(text="bold")}: {motley(text="Hello World", style="bold")}')
print(f'{motley(text="italic")}: {motley(text="Hello World", style="italic")}')
print(f'{motley(text="bold_italic")}: {motley(text="Hello World", style="bold_italic")}')
print()
print(motley(text="Пример с использованием различных цветов и стилей:"))
print(
motley(text="123", color="light_blue", style="italic"),
motley(text="456", color="blue", style="bold"),
motley(text="789", color="dark_blue", style="bold_italic")
)
print()
print(motley(text="Пример с использованием различных цветовых комбинаций и стилей:"))
print(motley(text="123456789", color_combo="fresh", style="bold_italic"))
print(motley(text="123456789", color_combo="volcano", style="bold_italic"))
print(motley(text="123456789", color_combo="night", style="bold_italic"))
Запустите этот код и вам всё станет понятно!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mtly-11.1.1.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mtly-11.1.1-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file mtly-11.1.1.tar.gz.
File metadata
- Download URL: mtly-11.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
236e2f7b054eb8e64133bdb4027badfdde8951dd96c7e53823c1ba21d4ffabc7
|
|
| MD5 |
f57316890dc25f02881d88c7456f6211
|
|
| BLAKE2b-256 |
ea910b1b6f98c941091c65a20896b8044c80ad35a2cb8ad9a18d39e9fd18192e
|
File details
Details for the file mtly-11.1.1-py3-none-any.whl.
File metadata
- Download URL: mtly-11.1.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b30dbf0304c403035a37ebfcbf49ca6462710167ba21337efbc3d5b5749252fd
|
|
| MD5 |
a9ab3bf0322f56ca65f76e1c25d8c9c7
|
|
| BLAKE2b-256 |
8c432110acdd3509b87d361909ebabdc71a12bbae01836760f794522a2ca241e
|