Python's missing debug print command, and more.
Project description
python devtools
Python's missing debug print command and other development tools.
For more information, see documentation.
Install
Just
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, 3.10 or 3.11.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file devtools-0.11.0.tar.gz
.
File metadata
- Download URL: devtools-0.11.0.tar.gz
- Upload date:
- Size: 74.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a6d987dfab0c7513a514e7faf0a71296d220423470204e76e0752d146dfad62 |
|
MD5 | 3efe42a52055e326a3f00b643959d139 |
|
BLAKE2b-256 | f3a1b262780730c593541e3fc38a1cc1d1869a63272629d714a3effc26c93b57 |
File details
Details for the file devtools-0.11.0-py3-none-any.whl
.
File metadata
- Download URL: devtools-0.11.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22a3b65b58713ccd7e8586feffdefaad57bbdbc6ff76bd68ecf3150a00cf41e3 |
|
MD5 | 5fadccf523eea6ea416bd14ad11085b6 |
|
BLAKE2b-256 | d4eb435361a3052dcd2c181f44c7b15751be7f9f5344e0b85efcb44f2191804e |