A simple package to print in color to the terminal
Project description
print-color
Print Color is a minimalist approach to terminal color printing in Python. It is a wrapper around the print()
function, and simply allows you to provide extra optional parameters such as:
- tag
- tag_color
- color
- background
- format
It aims to be a customizable logger for your applications, and makes formatting warnings, info messages and errors a breeze.
Information
This project has no dependencies.
Check out this project on PyPi here.
Colors:
purple
blue
green
yellow
red
magenta
cyan
white
Parameter values:
tag
- any string
tag_color
- color
color
- color
background
- color
format
- bold
- underline
- blink
Installing
pip3 install print-color
Requirements
- python 3.5^
Usage
from print_color import print
print("Hello world", tag='success', tag_color='green', color='white')
print("Error detected", tag='failure', tag_color='red', color='magenta')
print("Printing in color", color='green', format='underline', background='grey')
Contributing
Feel free to add or improve this project :) Just create a pull request and explain the changes you propose. Note that as this is a very simple project, feature requests should be kept minimal - things like more colors, formats etc would be ideal.
Credits
Built with Python Poetry.
Contributers
- Theo (@xy3)
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
Built Distribution
Hashes for print_color-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8047ce91f5634ee8ae5c20826087a3bf924116682ac130fd3a88c23be7226a51 |
|
MD5 | bd97b9b5da5374ab23421c7a31daf527 |
|
BLAKE2b-256 | 5e17b46ab14f75deb7bd79bd2cca1c181952cef91ea0832723f80d2ca4896d97 |