Skip to main content

Basic support for asci color text on linux terminals

Project description

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")

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

pryzm-0.1.4.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

pryzm-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pryzm-0.1.4.tar.gz.

File metadata

  • Download URL: pryzm-0.1.4.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pryzm-0.1.4.tar.gz
Algorithm Hash digest
SHA256 791140cccbbeaa8046efb7fcfb33f908c10906a3b66f80741751e00c28be19bc
MD5 dccdd2b2ea56bcca6c1238823f4ed773
BLAKE2b-256 ce6c01336fdd0cb754c10efa174279a264293118c9b5efb1311f94913de8b2ae

See more details on using hashes here.

File details

Details for the file pryzm-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pryzm-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pryzm-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ae35dc6c779bbddcef8e311c112c176c2e608075d32c47c87b6b4c2f78653d34
MD5 ebacc36501f84e089b0553d091f1f856
BLAKE2b-256 9bebbbdbd0600466b9eeec342e4619686199185ac390b0f733839c4712f114f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page