print-color
from print_color import print
print("Hello world", tag='success', tag_color='green', color='white')
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:
tagtag_colorortag_colourtag_formatcolororcolourbackgroundformat
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, apart from pytest for testing.
Check out this project on PyPi here.
Colors:
purple
blue
green
yellow
red
magenta
cyan
white
black
Parameter values:
tag- any string
tag_colorortag_colour- color
colororcolour- color
background- color
format- bold
- underline
- blink
Installing
pip install print-color
Or with uv:
uv add print-color
Requirements
- python 3.7^
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 standard Python tooling. Supports pip and uv.
Contributors
Metadata
Release files for print-color 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| print_color-0.4.8.tar.gz | 8.0 kB | Without provenance | Details for print_color-0.4.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| print_color-0.4.8-py3-none-any.whl | Python 3 | none | any | Details for print_color-0.4.8-py3-none-any.whl |
Total release size: 16.1 kB
Release files / print_color-0.4.8.tar.gz
| Download URL | print_color-0.4.8.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20e4c7c565c0359d980513a9e0cde4a59a468e5ffee904b5e4614c721319c8a3
|
|
BLAKE2b-256 checksum How to use checksums |
1de2065de732d92d39747481c6103ad9d594ca4a1dffa97d3ea58736a8429299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / print_color-0.4.8-py3-none-any.whl
| Download URL | print_color-0.4.8-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eaa5b8a9ee39e9e4dbfe1efef463ff9c91b5606c520fe9a9ededb3c26d74472
|
|
BLAKE2b-256 checksum How to use checksums |
39b6c2bb291e282fb409bd44710c605428021a58a415b15d575720b9e782aaf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for print-color 0.4.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.