Lightweight library for prettier terminal outputs and debugging similar to chalk for Javascript
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
Example:
from prettier_prints.prettier_prints import PrettierPrints
pp = PrettierPrints()
pp.style = 'red;underline' # <-- Can optionally predefine styling and can be overwritten
print(pp.out(msg="Lets test the output"))
print(pp.out(msg="Lets override the styling here", style="blue;bold"))
print(pp.out(print_msg={'msg': 'For those who prefer a JSON object param, this works too'}))
print(pp.out(print_msg={'msg': 'Can also overwrite this way', 'style': 'yellow;highlight'}))
print(f'Works great for output messages as well -> {pp.out(msg="See :)", style="magenta")}')
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 |
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.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb959bb9408c39efa3232ca0a49c8602e4d17eca5973e0e201637d211370c856 |
|
MD5 | a6ad6d2a25eb85d8e6b7d41c80be0a0a |
|
BLAKE2b-256 | 5ad6fb1eea433133d81afc23703935a853ff229a7c1d0c15fec7f017edb05199 |