Basic colors
This Python module provides you with:
- set of variables that you can use to color your text in terminal,
- logging like messages with or without icons,
- verbose on/off printing.
Installation
You can install the module using pip:
pip install basic-colors
Usage
Module basic_colors provides you with a set of variables that you can use to color your text in terminal.
Colored text
from basic_colors import *
print(Blue + "Ahoj" + Reset)
Logging like messages
from basic_colors import enable_icons, print_info, print_warning, print_error, verbose_print,
enable_icons(True)
print_info("This is an info message.")
print_warning("This is a warning message.")
print_success("This is a success message.")
print_error("This is an error message.", False)
ℹ️ Info: This is an info message.
⚠️ Warning: This is a warning message.
âś… Success: This is a success message.
❌ Error: This is an error message.
(in color)
Verbose print
The set_verbose(True) command enables verbose printing. If you want to print a message only in verbose mode, use the verbose_print() function.
from basic_colors import set_verbose, verbose_print
set_verbose(False)
verbose_print("This is a non-verbose message.")
set_verbose(True)
verbose_print("This is a verbose message.")
Sources:
Metadata
Release files for basic-colors 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| basic_colors-0.1.2.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basic_colors-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / basic_colors-0.1.2.tar.gz
| Download URL | basic_colors-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd8ee39266b4ab26b269ce7e0810416319d3326e6988c34f255158f61418906b
|
|
BLAKE2b-256 checksum How to use checksums |
f222f7108c6d7ecddfaad348f7d75caa898caa509bfd76d6306ccf590953779c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|
Release files / basic_colors-0.1.2-py3-none-any.whl
| Download URL | basic_colors-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc6508054837679c390d6d1a0ba784f6024b56b5b0cbbe8adcc9819174189cd2
|
|
BLAKE2b-256 checksum How to use checksums |
7c12bdb69e8a76e23c73054cd87bf3be80cd85dce526d22517ad868c2fd791f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.9
|