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.7+ 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)
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
}
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.
Release files for devtools 0.12.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| devtools-0.12.2.tar.gz | 75.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| devtools-0.12.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.4 kB
Release files / devtools-0.12.2.tar.gz
| Download URL | devtools-0.12.2.tar.gz |
|---|---|
| Size | 75.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efceab184cb35e3a11fa8e602cc4fadacaa2e859e920fc6f87bf130b69885507
|
|
BLAKE2b-256 checksum How to use checksums |
8475b78198620640d394bc435c17bb49db18419afdd6cfa3ed8bcfe14034ec80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / devtools-0.12.2-py3-none-any.whl
| Download URL | devtools-0.12.2-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c366e3de1df4cdd635f1ad8cbcd3af01a384d7abda71900e68d43b04eb6aaca7
|
|
BLAKE2b-256 checksum How to use checksums |
d1aeafb1487556e2dc827a17097aac8158a25b433a345386f0e249f6d2694ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|