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

>> python3 -m 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.2.tar.gz (5.2 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.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quickerDebug-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 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.2.tar.gz
Algorithm Hash digest
SHA256 d09bb9c84eef3afae6f9d9f5edb6ad9208eeeb28948776aa6c0f1c0c9368cc0d
MD5 e26accc8500e5d72e123cd7cb82bc006
BLAKE2b-256 8611176a22bf92993139f75383c6052536c2ff84cc9fdfaba8a70ce4435e8aec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quickerDebug-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0e98958934361465f0471ca787e2999aa9903c99a28bfc35549b1091df07e9bc
MD5 187e5c2762cd560a44a19c524f002e5b
BLAKE2b-256 279edf27eda8a652d5dc02cdc86c6a16b47b8500a5557410f0e2bc737960d017

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