style
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 |
||
|---|---|---|---|---|
|
|
|
|
|
Metadata
Release files for style 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| style-1.0.4.tar.gz | 2.9 kB | Without provenance | Details for style-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| style-1.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for style-1.0.4-py2.py3-none-any.whl |
Total release size: 7.7 kB
Release files / style-1.0.4.tar.gz
| Download URL | style-1.0.4.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8979d9f48802cf8fd7fa7702207b8487328f374a1c6c91eb00683f8826c0d12
|
|
BLAKE2b-256 checksum How to use checksums |
ba8ee045f8142c58dab9b70a9500ca70321145ec6bf02d37ae6e1d8b55b95815
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / style-1.0.4-py2.py3-none-any.whl
| Download URL | style-1.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2afc8ce245d76b8e1a6486adb125436f62cfd59690023c5b7bb7d5715fb36d8f
|
|
BLAKE2b-256 checksum How to use checksums |
9998ba5ecba2a0a8bb77888f0d962d7e6d22dcd5569f79a0c7119002acc7c61c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for style 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.