Skip to main content

Python's missing debug print command, and more.

Project description

python devtools

CI Coverage pypi versions license

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:

python-devtools demo

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devtools-0.12.0.tar.gz (74.9 kB view details)

Uploaded Source

Built Distribution

devtools-0.12.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file devtools-0.12.0.tar.gz.

File metadata

  • Download URL: devtools-0.12.0.tar.gz
  • Upload date:
  • Size: 74.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for devtools-0.12.0.tar.gz
Algorithm Hash digest
SHA256 b131ca6e50b913353e29fc2f4057c61f2882e501f406f10a50c1bd3b2becdc51
MD5 23539fa6f13bdca63e0e3304903dee75
BLAKE2b-256 a2fcbdc6378e9b5705bb6a325722474a6c27dc1944782aa272566ab485d1f150

See more details on using hashes here.

File details

Details for the file devtools-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: devtools-0.12.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.12

File hashes

Hashes for devtools-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cda8b8f6293388f59e42be0a53d654217066a9e79160109b91af045c63b1b240
MD5 a9082c6f670d2bbdf5833cb789a0aca1
BLAKE2b-256 936152c9ef190c6aba26351df16802468075b79ec2ad0219bb8a2a7e37692154

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page