Gwill / python-devtools

Dev tools for python

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python devtools

CI Coverage pypi versions license

Python's missing debug print command and other development tools.

For more information, see documentation.



pip install devtools[pygments]

pygments is not required but if it's installed, output will be highlighted and easier to read.

devtools has no other required dependencies except python 3.7, 3.8, 3.9 or 3.10. If you've got python 3.7+ and pip installed, you're good to go.


from devtools import debug

whatever = [1, 2, 3]

Outputs: <module>:
    whatever: [1, 2, 3] (list)

That's only the tip of the iceberg, for example:

import numpy as np

data = {
    'foo': np.array(range(20)),
    'bar': {'apple', 'banana', 'carrot', 'grapefruit'},
    'spam': [{'a': i, 'b': (i for i in range(3))} for i in range(3)],
    'sentence': 'this is just a boring sentence.\n' * 4



python-devtools demo

Usage without Import

devtools can be used without from devtools import debug if you add debug into __builtins__ in

For instructions on adding debug to __builtins__, see the installation docs.


Dev tools for python

License:MIT License


Language:Python 98.0%Language:Makefile 2.0%