Lightweight library for prettier terminal outputs and debugging similar to chalk for Java
Project description
Prettier_prints
Lightweight library for prettier terminal outputs similar to chalk for JavaScript. Helping make Python outputs easier to read and styled to your desires.
Install
pip install prettier-prints
Current functions:
- out()
Current available styling:
Modifiers | Colors / Background Colors |
---|---|
Bold | Red |
Underline | Green |
Highlight | Yellow |
Blue | |
Magenta | |
Cyan | |
White | |
Bright Red | |
Bright Green | |
Bright Yellow | |
Bright Blue | |
Bright Magenta | |
Bright Cyan | |
Bright White |
Example:
from prettier_prints.prettier_prints import PrettierPrints
pp = PrettierPrints()
print(pp.out({'msg': "Let's turn this message red", 'style': 'red'}))
print(pp.out({'msg': "Lets also underline it", 'style': 'red;underline'}))
print(pp.out({'msg': "May as well bold it too", 'style': 'red;underline;bold'}))
print(pp.out({'msg': "What about a blue background?", 'style': 'blue;highlight'}))
print(f'This also works for output messages -> {pp.out(print_msg={"msg": "See :)", "style": "magenta;bold;underline"})}')
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for prettier_prints-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56000b4e9d188cf5a74c2a3d292412d37f266a6d5db30cd3bd6e52d6234c9ab9 |
|
MD5 | bb5c597462eedbf6cd50c95eb35f451d |
|
BLAKE2b-256 | 41a620f534032d2cc9579d622cd86f86a5fa3f6752c05de313c73898c88e27d5 |