Skip to main content

Instant debugger alternative for python

Project description

Welcome to quickerDebug!

QuickerDebug offers a standardized alternative to print("here") and print(my_var) with simple, quick, and efficient logging functions that provide information without the need to repeat yourself. Generally, the best use case is for small scale applications or test code, where a complete debugger is overkill, but print("here") can get overly tedious to repeatedly type. Function names are purposefully shortened avoid writing out long function calls, so you don't waste time while debugging.

Note that quickerDebug is optimized for terminals supported colors (through termcolor), meaning it may not work on all CLIs.

Installation

>> pip install quickerDebug

Quick Start

Initialization

To use the package, you need to create an instance of QuickerDebug, from which methods can be called.

from quickerDebug import quickerDebug
qd = quickerDebug.QuickerDebug()

Basic Logging

The two essential functions for logging are qd.p() and qd.v().

# Logs index, line number, timestamp, and a optional message
qd.p()

# qd.p() also supports positional arguments for extra functionality like so:
qd.p(status="DEBUG", msg="", color=None, showFullPath=False, **kwargs)
# ie
qd.p("INFO", "First Test", "blue", True)

# Logs all variables with thier current values
qd.v()

# Variables are displayed inline
qd.v(inline=True)

AutoVar Configs

AutoVar configs allow you to set up a list of varibles with a certain format to be printed with current values with the qd.vc() function, and then allows you to access that printing configuration with qd.v(config_key).

a = 1
b = 2
# Create a config that prints the variables a and b, where the config_key is 1
qd.vc(1, "a", "b")

# Would print just a & b
qd.v(1) # config_key is the first argument

Variable Tracking

quickerDebug also provides lightweight, real-time variable tracking in the terminal through qd.track() and qd.rt()

a = 1

# Would print the value of a every 10ms for 5s
qd.track("a", 10, 5)

# Would clear the terminal after each print
qd.track("a", 10, 5, autoclear=True)

# Preset Function for indefinite real-time tracking
qd.rt("a")

Additional Keyword Arguments

All quickerDebug functions can take certain keyword arguments, as shown below:

Function Kwargs
qd.p() status : str
qd.p() & qd.v() showFullPath : bool
qd.p() & qd.v() color : str (from colors in termcolor)
qd.p() msg : str
qd.v() inline : bool
qd.track() & qd.rt() autoclear : bool
Kwarg Possible Values
status "OFF", "O", "ERROR", "ERR", "E", "WARNING", "WARN", "W", "DEBUG", "D", "INFO", "I", "TRACE", "T"
color "grey", "red", "green", "yellow", "blue", "magenta", "cyan", "white"

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

quickerDebug-0.1.4.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

quickerDebug-0.1.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file quickerDebug-0.1.4.tar.gz.

File metadata

  • Download URL: quickerDebug-0.1.4.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for quickerDebug-0.1.4.tar.gz
Algorithm Hash digest
SHA256 aa5b620599ef7f4c6bd8d9fc18c4d6715eb3850f825b75b67132e31e0db75c3e
MD5 d4f70926ce30676e1ce14e583dda605a
BLAKE2b-256 15913792a1728f229dec0d6ce63336bbe042a5c5e0288f7a3e3cc6f35a43471d

See more details on using hashes here.

File details

Details for the file quickerDebug-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: quickerDebug-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for quickerDebug-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a9706d355b5e4a2dbd5afb4bf9a9915bf40918c5b1c01d0d205ed58ea7541835
MD5 cf9aebec5299f32c10fa2c285fd9e8ac
BLAKE2b-256 141ffc30e15c7ccef5a465290ce3366df0e46b1a0cb453d89c824d861e425887

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