Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelcolvin/python-devtools
Dev tools for python
https://github.com/samuelcolvin/python-devtools
devtools python python-devtools
Last synced: 5 days ago
JSON representation
Dev tools for python
- Host: GitHub
- URL: https://github.com/samuelcolvin/python-devtools
- Owner: samuelcolvin
- License: mit
- Created: 2017-08-20T15:30:06.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T06:15:12.000Z (8 months ago)
- Last Synced: 2024-10-29T15:12:44.067Z (3 months ago)
- Topics: devtools, python, python-devtools
- Language: Python
- Homepage: https://python-devtools.helpmanual.io/
- Size: 707 KB
- Stars: 985
- Watchers: 10
- Forks: 47
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- best-of-python-dev - GitHub - 38% open · ⏱️ 26.01.2024): (Logging)
- awesome-hacking-lists - samuelcolvin/python-devtools - Dev tools for python (Python)
README
# python devtools
[![CI](https://github.com/samuelcolvin/python-devtools/workflows/CI/badge.svg?event=push)](https://github.com/samuelcolvin/python-devtools/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
[![Coverage](https://codecov.io/gh/samuelcolvin/python-devtools/branch/main/graph/badge.svg)](https://codecov.io/gh/samuelcolvin/python-devtools)
[![pypi](https://img.shields.io/pypi/v/devtools.svg)](https://pypi.python.org/pypi/devtools)
[![versions](https://img.shields.io/pypi/pyversions/devtools.svg)](https://github.com/samuelcolvin/python-devtools)
[![license](https://img.shields.io/github/license/samuelcolvin/python-devtools.svg)](https://github.com/samuelcolvin/python-devtools/blob/main/LICENSE)**Python's missing debug print command and other development tools.**
For more information, see [documentation](https://python-devtools.helpmanual.io/).
## Install
Just
```bash
pip install devtools
```If you've got python 3.7+ and `pip` installed, you're good to go.
## Usage
```py
from devtools import debugwhatever = [1, 2, 3]
debug(whatever)
```Outputs:
```py
test.py:4 :
whatever: [1, 2, 3] (list)
```That's only the tip of the iceberg, for example:
```py
import numpy as npdata = {
'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](https://raw.githubusercontent.com/samuelcolvin/python-devtools/main/demo.py.png)
## 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](https://python-devtools.helpmanual.io/usage/#usage-without-import).