Skip to main content

TextUI colors for Python.

Project description

Better Crayons: Text UI colors for Python.

pypi build license wheel python

This module is really simple, it gives you colored strings for terminal usage. Included colors are red, green, yellow, blue, black, magenta, cyan, white, and normal ( as well as clean and disable).

Better Crayons is nice because it automatically wraps a given string in both the foreground color, as well as returning to the original state after the string is complete. Most terminal color libraries make you manage this yourself.

example

Arguments include always=True and bold=True.

Features

  • If you call disable(), all future calls to colors will be ignored.
  • If you call normal(), color is reset to default foreground color
  • If the current process is not in a TTY (e.g. being piped), no colors will be displayed.
  • Length of ColoredStrings can be properly calculated.
  • Powered by colorama.

Usage is simple

# red is red, white is white.
>>> print('{} white'.format(better_crayons.red('red')))
red white

That's it!

Installation

$ pip install better_crayons

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

better_crayons-0.0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

better_crayons-0.0.2-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file better_crayons-0.0.2.tar.gz.

File metadata

  • Download URL: better_crayons-0.0.2.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for better_crayons-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b1a617acf59c84c0a9523153085e3ba4433e6da7baabcbf2918c83606d11f9cb
MD5 e18bea33ebd96998e6dc3d3890b85c7b
BLAKE2b-256 1b02f7c002813be06cce5d02f20b95f018061b1ce4317d20ca00477a1935b7dd

See more details on using hashes here.

File details

Details for the file better_crayons-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: better_crayons-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.7

File hashes

Hashes for better_crayons-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5807eb743d79dba5a9ff9e39f4a46af2adf17f2a9ae5b359e3330b0e46729cb8
MD5 c30cd5204f7175cbd91937646d6740f6
BLAKE2b-256 902dcfc8c944a942ed010ad44bdc195907765ee59273bfc6e603a0011208212b

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