A Python library for pretty printing and enhanced console output.
Project description
PrettyPi
PrettyPi is a Python library for enhancing console output with colorful and style text, emojis, tables, and more.
Features
- PrettyPrint
- Emoji: Add emojis to your console messages.
- Color: Easily print text in various colors.
- Style: Easily print text with style.
- Background Color: Print text with colored background.
- Alignment: Support text alignment (left, center, right).
- Alert: print alert messages
- PrettyTable
- Display: Create and display tables in the console.
- Custom: Customize table formatting and styles.
- Template: Define and use templates for displaying tables.
- Sorting: Implement sorting functionality for table columns.
- Filtering: Add filtering capabilities to tables based on user-defined criteria.
- Pagination: Enable pagination for large datasets displayed in tables.
Installation
You can install PretiPy using pip:
pip install prettypi
Usage
Here's a quick example of how to use PrettyPi:
pretty_print
from prettypi.pretty_print import StyledStr
from prettypi.pretty_print.utils import Color, Style, Emoji, BackgroundColor
styled_str = StyledStr("My name", background_color=BackgroundColor.MAGENTA, style=Style.UNDERLINE)
styled_str2 = StyledStr("Toto", color=Color.RED, style=Style.BOLD)
print(f"{styled_str} is {styled_str2} {Emoji.SMILE}")
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
prettypi-0.2.0.tar.gz
(7.3 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
File details
Details for the file prettypi-0.2.0.tar.gz.
File metadata
- Download URL: prettypi-0.2.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff21a8cbc21d9914000a95e5dd38892201ace3ea5d5bc83680544042247cac05
|
|
| MD5 |
d4ff4c7e8d6e920d835812207d1d8860
|
|
| BLAKE2b-256 |
333b047e1c791f0a8a1b066f257e8f76a19974e7274a1a921cc9adae7204dc70
|
File details
Details for the file prettypi-0.2.0-py3-none-any.whl.
File metadata
- Download URL: prettypi-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2f4c52b657115d97951123417aebc7550b97642e4a4e81b9bb3e06fbb572d7b
|
|
| MD5 |
8eafa3cc62c1cadc13eef567479fda31
|
|
| BLAKE2b-256 |
6874c2efa4fa8805c79ce98022cd70f3bd7664b05235cbda3d70c59dc57eb45c
|