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.1.tar.gz (74.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: devtools-0.12.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9cac86adec822108006dd6b1c54fa900fc96c0b7e4c8928680403cd33a557553
MD5 d13de95581eb28f1df1f3a1d4026c830
BLAKE2b-256 77a76eb1bae3af2079eb6687219d5509600b3094d9879c1914b09e72ab18cc36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: devtools-0.12.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 972ba41ed3655660f8b6952684d8b21e10d274617651c169aaaf0ad423ec4767
MD5 3a825813f7daea098c36f7f4775113e9
BLAKE2b-256 438b72b9c8dadf8fd07535775c3cd9aae8e7cdeb907b83465c9e94000c1e162a

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