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

better_devtools-0.13.3.tar.gz (76.3 kB view details)

Uploaded Source

Built Distribution

better_devtools-0.13.3-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file better_devtools-0.13.3.tar.gz.

File metadata

  • Download URL: better_devtools-0.13.3.tar.gz
  • Upload date:
  • Size: 76.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for better_devtools-0.13.3.tar.gz
Algorithm Hash digest
SHA256 cf7fb105ed83c70902f6d82307fdd7f42512e3a99cfd7e80dd9c2d9edf4b44cf
MD5 64d9037c36f2026e9271d5c51a1d8ff8
BLAKE2b-256 41f4711717851a54c4a8203ec6e4a77383f8becd1052f61641bfd056ee7be405

See more details on using hashes here.

File details

Details for the file better_devtools-0.13.3-py3-none-any.whl.

File metadata

File hashes

Hashes for better_devtools-0.13.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f343b62ff119fd659494f44a63247bcc71ecdec6dbc2c497e6df9471081e08e6
MD5 37205be0282eaf9b98bfb2c46cd60f9a
BLAKE2b-256 ae25e12b761b90d0e913cbed76b4a11e851542f9c561956c308d2b61416fd319

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