A module for printing colored text to the terminal
Project description
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:
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basic_colors-0.1.1.tar.gz.
File metadata
- Download URL: basic_colors-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8fa49e0cbdb25b7c79246498177314f35b0ff745ee810d82bb52812610e88d0
|
|
| MD5 |
f44d0dab5fdcd13989f747c369f797fe
|
|
| BLAKE2b-256 |
3e3b7e3366813d89249f2cbb6d09fe33a98922217083286a0696912636bf92d9
|
File details
Details for the file basic_colors-0.1.1-py3-none-any.whl.
File metadata
- Download URL: basic_colors-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2be1cb69a9e4854ae6149ee52d1b3f9191e56bc216e11ee335c7c9cbe7eb4238
|
|
| MD5 |
e30712d4ecaac6f48f96199862e3a9f1
|
|
| BLAKE2b-256 |
4d6a10c718f327355f94240c3e26d39d369a2cdebd87d1508327c66d4e75b5a1
|