🌈 Terminal string styling
Project description
clr is a simple terminal string styling library. Its API is a port of the popular chalk module for javascript.
Install
$ pip install clr
Usage
import clr
print(clr.red.bold('Hello world!'))
API
clr.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. clr.red.yellow.green is equivalent to clr.green.
Multiple arguments will be separated by sep, a space by default.
Styles
Modifiers |
Colors |
Background colors |
||
---|---|---|---|---|
|
|
|
|
|
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file clr-1.0.3.tar.gz
.
File metadata
- Download URL: clr-1.0.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26505b51f73518d531a52b1f7855488f8c764de94f248ebb7cbe0549acc9d333 |
|
MD5 | 3ae49eba791b458a4d7b5ba2ab7cc754 |
|
BLAKE2b-256 | 758f22b6b4813e45da30d2411d7c807364e806188beb4a0a41cb8c5f739cb39c |
File details
Details for the file clr-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: clr-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7553f81f7ddc5579e45616ced5fcbdae3941ec817dacf5972d39a156c7cdba1a |
|
MD5 | 008d74bf1e4ddc400fe91b9bc67de0ba |
|
BLAKE2b-256 | a471fb95dfed94ce26310b54216f868d113cb0202691ae56ee4bca2e931f50b0 |