colorP
This package is a small and simple utility for printing colored strings on consoles. colorP supports 9 different formatting styles and several foreground and background colors!
You can install it by issuing the following command on a UNIX terminal:
sudo pip install -i colorp
Usage:
Methods :-
pPrint(args,text,br=?):
args: is a dictionary object, which needs atleast one ofs,fgorbgdefined with the corresponding values as strings.
args = {'s':'bold','fg':'red','bg':'white'}
text: is the string to be printed with the given stylingbr: [OPTIONAL ARGUMENT: default value=True], can set it toFalseif you need no linebreak after ouput.
Eg():
- prints out examples of a few colors and styles for user visualization.
Styling and Formatting:
- The
argsobject decides how the text will be formatted. Each key inargscan be one of certain pre-defined values. They are listed below: 's': Text style
| Value | Description |
|---|---|
'plain' |
Formats the text as plain text |
'bold' |
Bolds the text |
'dim' |
Dims the text |
'italic' |
Italicizes the text |
'underline' |
Underlines the text |
'blink' |
Blinks the text repeatedly |
'reverse' |
Swaps foreground and background values |
'hidden' |
Hides the text on display |
'striked' |
Strikes off the desired text |
'fg': Font color
| Value |
|---|
'black' |
'red' |
'green' |
'yellow' |
'blue' |
'magenta' |
'cyan' |
'lightgray' |
'darkgray' |
lightred' |
'lightgreen' |
'lightyellow' |
'lightblue' |
'lightmagenta' |
'lightcyan' |
'white' |
'default' |
'bg': Background color
| Value |
|---|
'black' |
'red' |
'green' |
'yellow' |
'blue' |
'magenta' |
'cyan' |
'lightgray' |
'darkgray' |
lightred' |
'lightgreen' |
'lightyellow' |
'lightblue' |
'lightmagenta' |
'lightcyan' |
'white' |
'default' |
NOTE:
'bg'has the same possible values as'fg'.
Metadata
Release files for colorp 0.0.1
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 |
|---|---|---|---|---|
| colorp-0.0.1.tar.gz | 3.0 kB | Without provenance | Details for colorp-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colorp-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for colorp-0.0.1-py3-none-any.whl |
Total release size: 6.9 kB
Release files / colorp-0.0.1.tar.gz
| Download URL | colorp-0.0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59f604107265c71886529f820f95eb4338c39adc8653651ede0de1e79f27ae3e
|
|
BLAKE2b-256 checksum How to use checksums |
8d818fc8c35af10aa044288a5d0adbf2624faf9668397ea1ec9a0cbb8e2d0a82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / colorp-0.0.1-py3-none-any.whl
| Download URL | colorp-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b30d73a829f47740ff85abf5bf111bc5031c47406258f98d42586a7257ca5303
|
|
BLAKE2b-256 checksum How to use checksums |
dd3d1fa7131700a8279f619b955ca78cf47ba14ae96dee0cf118b42f9e29933e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Security for colorp 0.0.1
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.