Pryzm, color convenient class for linux/mac cli
Install it
pip install pryzm
Create color 'wrappers' to compose text for printing
import pryzm as pz
red = pz.Pryzm().red # create a function for a color
red_on_blue = pz.Pryzm().red().BLUE # lower case is text, CAPS is background.
# NB: that to chain you need the () to capture the 'self' return
print(red('Red Text') + " " + red_on_blue("followed by blue text")) # prints red and blue text
Create standalone functions to print directly by setting echo=True in constructor
import pryzm as pz
red = pz.Pryzm(echo=True).red
red_on_blue = pz.Pryzm(echo=True).red().BLUE
red("This is red text") # These two functions now print directly
red_on_blue("This is red text with blue background")
# great for quickly creating semantic printing to better read console output!
warning = pz.Pryzm(echo=True).yellow
info = pz.Pryzm(echo=True).cyan
error = pz.Pryzm(echo=True).red
error("Error: this text shows as red")
warning("Warning: pay attention, but really just an fyi")
info("Cyan is probably a little strong, maybe green would be better")
Metadata
Release files for pryzm 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pryzm-0.1.4.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pryzm-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / pryzm-0.1.4.tar.gz
| Download URL | pryzm-0.1.4.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
791140cccbbeaa8046efb7fcfb33f908c10906a3b66f80741751e00c28be19bc
|
|
BLAKE2b-256 checksum How to use checksums |
ce6c01336fdd0cb754c10efa174279a264293118c9b5efb1311f94913de8b2ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.7
|
Release files / pryzm-0.1.4-py3-none-any.whl
| Download URL | pryzm-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae35dc6c779bbddcef8e311c112c176c2e608075d32c47c87b6b4c2f78653d34
|
|
BLAKE2b-256 checksum How to use checksums |
9bebbbdbd0600466b9eeec342e4619686199185ac390b0f733839c4712f114f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.7
|