🌈 Terminal string styling
Project description
style is a simple terminal string styling library. Its API is a port of the popular chalk module for javascript.
Install
$ pip install style
Usage
import style
print(style.red.bold('Hello world!'))
API
style.style*[.style](*objects, sep=' ')
Chain styles and call the last one as a method with an argument. Order doesn’t matter, and later styles take precedence in case of a conflict, e.g. style.red.yellow.green is equivalent to style.green.
Multiple arguments will be separated by sep, a space by default.
style.enabled
Color support is automatically detected, but can also be changed manually.
set style.enabled to True or False
use the command line parameter --color or --no-color
Styles
Modifiers |
Colors |
Background colors |
||
---|---|---|---|---|
|
|
|
|
|
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 style-1.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2afc8ce245d76b8e1a6486adb125436f62cfd59690023c5b7bb7d5715fb36d8f |
|
MD5 | 49222a80a09d89326f90cda4a9fb6b58 |
|
BLAKE2b-256 | 9998ba5ecba2a0a8bb77888f0d962d7e6d22dcd5569f79a0c7119002acc7c61c |