Skip to main content

Tools to help development and debugging

Project description

Devpy is a set of tools to ease Python development.

Autolog

Setuping proper loging is tedious, so you may want to do it later, but you wish you could get basic logging right now:

import devpy

# Get a logger that automatically log to console and a rotating file # The rotating file is setup in the temp directory of your system, in # a subdir named after your __name__. # The file path is printed at the begining of the program.

log = devpy.autolog() # log is a regular stdlib logger object

# start logging:

log.info(‘Yes’)

Once you have time to setup logging seriously, you can just replace the autolog with a regular custom Python logger, and all your logs will still work.

Stacktrace helper

Format the stack trace so that:

  • it separates the various logicial blocs

  • it emphasis the lines of your programs and not the stdlb

  • lines of your program are syntax highlited

::

import devpy log = devpy.color_traceback()

All helpers at once

::

import devpy log = devpy.dev_mode() # can set color_traceback=True, autolog=True

# or just # import devpy.develop as log # for a one liner to activate it all

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

devpy-0.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

devpy-0.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

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