Python's missing debug print command, and more.
Project Links
Meta
Author: Samuel Colvin
Requires Python: >=3.10
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
- Education
- Information Technology
- Science/Research
- System Administrators
Operating System
- Unix
- POSIX :: Linux
Environment
- Console
- MacOS X
Framework
- Pydantic
- Pydantic :: 2
Programming Language
- Python :: 3 :: Only
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.15
Topic
- Software Development :: Libraries :: Python Modules
- Internet
Typing
- Typed
python devtools
Python's missing debug print command and other development tools.
For more information, see documentation.
Install
Just
pip install devtools
If you've got python 3.10+ and pip installed, you're good to go.
Usage
from devtools import debug
whatever = [1, 2, 3]
debug(whatever)
Outputs:
test.py:4 <module>:
whatever: [1, 2, 3] (list) len=3
That's only the tip of the iceberg, for example:
import numpy as np
from devtools import debug
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
}
debug(data)
outputs:

Usage without Import
devtools can be used without from devtools import debug if you add debug into builtins
in sitecustomize.py.
For instructions on adding debug to builtins,
see the installation docs.
0.13.0
Oct 11, 2026
0.12.2
Sep 03, 2023
0.12.1
Aug 17, 2023
0.12.0
Aug 17, 2023
0.11.0
Apr 05, 2023
0.10.0
Nov 28, 2022
0.9.0
Jul 26, 2022
0.8.0
Sep 29, 2021
0.7.0
Sep 03, 2021
0.6.1
Oct 22, 2020
0.6
Jul 29, 2020
0.5.1
Oct 09, 2019
0.5
Jan 03, 2019
0.4
Dec 29, 2018
0.3
Oct 11, 2017
0.2
Sep 14, 2017
0.1
Sep 09, 2017
0.0.2
Aug 21, 2017
0.0.1
Aug 21, 2017