This module helps to print messages in different colours on terminal & various python IDEs using rich module.
Project description
console-messenger
About
This package displays success, warning and info messages and errors on console with different colours using rich module. It also prints any error type without passing it as a parameter.
Requirements
python>=3.0
Dependencies
rich==9.3.0
Installation
pip install console-messenger
Usage
>>> from ConsoleMessenger import ConsoleMessage
>>> console = ConsoleMessage()
Print an error
try:
a = 5/0
except Exception as e:
console.danger(e)
Output :-
Display a custom error
console.danger("this is a custom error", err_type="My Error")
Output :-
Print a success message
console.success("Success", "success method worked!")
Output :-
Display a warning
console.warning("Warning", "You are using pip version 20.2.4; however, version 20.3 is available.")
Output :-
Display a info message
console.info("INFO", "Hello User!")
Output :-
Display a dark message
console.dark("Dark", "This is a dark message!")
Output :-
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
console-messenger-0.0.1.tar.gz
(45.8 kB
view hashes)
Built Distribution
Close
Hashes for console_messenger-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 056c0935487518e9100277564169635a72c1ee28e2421c8a8a5956bfc445dd86 |
|
MD5 | 6c9ef4cfa821cda3537c3d2720528b7e |
|
BLAKE2b-256 | 503c2b420853499878d70ce2ecd93ca2145b6ce5fe29f9ada2273a6cdb3eb906 |