Skip to content

ajay-lingayat/console-messenger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

console-messenger

Downloads Downloads/Week Downloads/Month MIT License Latest PyPI version Supported Python versions Documentation Status

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.0.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 :-

Broken Image

Display a custom error

 console.danger("this is a custom error", err_type="My Error")

Output :-

Broken Image

Print a success message

 console.success("Success", "success method worked!")

Output :-

Broken Image

Display a warning

 console.warning("Warning", "You are using pip version 20.2.4; however, version 20.3 is available.")

Output :-

Broken Image

Display a info message

 console.info("INFO", "Hello User!")

Output :-

Broken Image

Display a dark message

 console.dark("Dark", "This is a dark message!")

Output :-

Broken Image

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages