Dev tools for python
Project description
Dev tools for python.
The debug print command python never had (and other things).
For more information, see documentation
Install
Just:
pip install devtools[pygments]
(pygments is not required but if it’s available output will be highlighted and easier to read.)
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
modify /usr/lib/python3.6/sitecustomize.py making debug available in any python 3.6 code
# add devtools debug to builtins
try:
from devtools import debug
except ImportError:
pass
else:
__builtins__['debug'] = debug
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devtools-0.5.tar.gz.
File metadata
- Download URL: devtools-0.5.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cfa78d431570ec40620c87553e59dff2ae77dc70bbaa4da87c0cd23255d5e68
|
|
| MD5 |
37c7887610fe1ffdc15b269900541c16
|
|
| BLAKE2b-256 |
697eab3b02aabb2bbbf6c24f8234003850a303ba64324edb26453ca3dfc812bd
|
File details
Details for the file devtools-0.5-py35,py36-none-any.whl.
File metadata
- Download URL: devtools-0.5-py35,py36-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3.5,py36
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1561e0f9905d5f564f371b30dda3861f6886b40a58112ff97539008f4a9df3fa
|
|
| MD5 |
53825593964a468f594f3d68ad191a3f
|
|
| BLAKE2b-256 |
ba4783858d37752f659d5557d2c47b8de658408d0cacf558361db87ecf75f669
|