Skip to main content

A colorful debug print module.

Project description

Colorful Debug

Author: Nabil El Ouaamari (nabil.elouaamari.dev@gmail.com)

Description

Colorful Debug is a Python module that provides colorful and customizable debug print messages with timestamps. It's designed to make debugging your applications more user-friendly and visually appealing.

Installation

You can install Colorful Debug using pip:

pip install colorful-debug

Usage

from colorful_debug import ColorfulDebug

# As default, timestamp and bold font are enabled
debug = ColorfulDebug(show_timestamp=True, all_bold=False)

# Print debug messages with different message types
debug.print(message, msg_type="normal", ov_bold=None)           # default behavior, 'ov_bold' overrides all_bold
debug.print("This is a normal message")                         # color is 'white' by default
debug.print("This is a warning message", msg_type="warning")    # color is 'yellow' by default
debug.print("This is an info message", msg_type="info")         # color is 'cyan' by default
debug.print("This is an error message", msg_type="error")       # color is 'red' by default

Customization

# Customize color and prefix for different message types
debug.set_color("warning", "yellow")
debug.set_prefix("info", "[Info]")

# Disable timestamp
debug.set_show_timestamp(False)

# Create a new message type
debug.new_message_type("success", prefix="[Success]", suffix="", color="green", bold=False)

# Use the new message type
debug.print("This is a success message", msg_type="success")

# Update the new message type
debug.set_color("success", "blue")
debug.set_prefix("success", "[OK]")
debug.set_suffix("success", " (OK)")
debug.set_bold("success", True)

Configuration

You can configure Colorful Debug to fit your needs. Customize colors, prefixes, timestamps, and more.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contact / Support

If you have any questions, suggestions, or concerns, feel free to contact me at nabil.elouaamari.dev@gmail.com.

Acknowledgements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colorful-debug-1.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colorful_debug-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file colorful-debug-1.0.1.tar.gz.

File metadata

  • Download URL: colorful-debug-1.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for colorful-debug-1.0.1.tar.gz
Algorithm Hash digest
SHA256 88dc5e8773f917c3a6e1f7e924be8d5554df146b97269081963259e9588ee924
MD5 d9f6ada5f92c491686344ed19f91fc09
BLAKE2b-256 c6a0487cf9f061974569b464d9a556d0be697ef88bdc5e97a817cd262796828a

See more details on using hashes here.

File details

Details for the file colorful_debug-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: colorful_debug-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for colorful_debug-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8eafecd11e0a2630fff8dc9d7743960071473b9aafdf83134bf9b9afb80d60f4
MD5 9a491f595037baee707e22256129ffeb
BLAKE2b-256 159398126bcec9fe7be1ead6ff90318bf72c1eee70bbe61de2f3316b7ed5420c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page