Name | devtools JSON |
Version |
0.12.1
JSON |
| download |
home_page | |
Summary | Python's missing debug print command, and more. |
upload_time | 2023-08-17 14:55:30 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | The MIT License (MIT) Copyright (c) 2017 to present Samuel Colvin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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 debug
whatever = [1, 2, 3]
debug(whatever)
```
Outputs:
```py
test.py:4 <module>:
whatever: [1, 2, 3] (list)
```
That's only the tip of the iceberg, for example:
```py
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](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).
Raw data
{
"_id": null,
"home_page": "",
"name": "devtools",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "Samuel Colvin <s@muelcolvin.com>",
"download_url": "https://files.pythonhosted.org/packages/77/a7/6eb1bae3af2079eb6687219d5509600b3094d9879c1914b09e72ab18cc36/devtools-0.12.1.tar.gz",
"platform": null,
"description": "# python devtools\n\n[![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)\n[![Coverage](https://codecov.io/gh/samuelcolvin/python-devtools/branch/main/graph/badge.svg)](https://codecov.io/gh/samuelcolvin/python-devtools)\n[![pypi](https://img.shields.io/pypi/v/devtools.svg)](https://pypi.python.org/pypi/devtools)\n[![versions](https://img.shields.io/pypi/pyversions/devtools.svg)](https://github.com/samuelcolvin/python-devtools)\n[![license](https://img.shields.io/github/license/samuelcolvin/python-devtools.svg)](https://github.com/samuelcolvin/python-devtools/blob/main/LICENSE)\n\n**Python's missing debug print command and other development tools.**\n\nFor more information, see [documentation](https://python-devtools.helpmanual.io/).\n\n## Install\n\nJust\n\n```bash\npip install devtools\n```\n\nIf you've got python 3.7+ and `pip` installed, you're good to go.\n\n## Usage\n\n```py\nfrom devtools import debug\n\nwhatever = [1, 2, 3]\ndebug(whatever)\n```\n\nOutputs:\n\n```py\ntest.py:4 <module>:\n whatever: [1, 2, 3] (list)\n```\n\n\nThat's only the tip of the iceberg, for example:\n\n```py\nimport numpy as np\n\ndata = {\n 'foo': np.array(range(20)),\n 'bar': {'apple', 'banana', 'carrot', 'grapefruit'},\n 'spam': [{'a': i, 'b': (i for i in range(3))} for i in range(3)],\n 'sentence': 'this is just a boring sentence.\\n' * 4\n}\n\ndebug(data)\n```\n\noutputs:\n\n![python-devtools demo](https://raw.githubusercontent.com/samuelcolvin/python-devtools/main/demo.py.png)\n\n## Usage without Import\n\ndevtools can be used without `from devtools import debug` if you add `debug` into `__builtins__`\nin `sitecustomize.py`.\n\nFor instructions on adding `debug` to `__builtins__`,\nsee the [installation docs](https://python-devtools.helpmanual.io/usage/#usage-without-import).\n",
"bugtrack_url": null,
"license": "The MIT License (MIT) Copyright (c) 2017 to present Samuel Colvin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Python's missing debug print command, and more.",
"version": "0.12.1",
"project_urls": {
"Changelog": "https://github.com/samuelcolvin/python-devtools/releases",
"Documentation": "https://python-devtools.helpmanual.io",
"Funding": "https://github.com/sponsors/samuelcolvin",
"Homepage": "https://github.com/samuelcolvin/python-devtools",
"Source": "https://github.com/samuelcolvin/python-devtools"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "438b72b9c8dadf8fd07535775c3cd9aae8e7cdeb907b83465c9e94000c1e162a",
"md5": "3a825813f7daea098c36f7f4775113e9",
"sha256": "972ba41ed3655660f8b6952684d8b21e10d274617651c169aaaf0ad423ec4767"
},
"downloads": -1,
"filename": "devtools-0.12.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a825813f7daea098c36f7f4775113e9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 19313,
"upload_time": "2023-08-17T14:55:28",
"upload_time_iso_8601": "2023-08-17T14:55:28.994704Z",
"url": "https://files.pythonhosted.org/packages/43/8b/72b9c8dadf8fd07535775c3cd9aae8e7cdeb907b83465c9e94000c1e162a/devtools-0.12.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "77a76eb1bae3af2079eb6687219d5509600b3094d9879c1914b09e72ab18cc36",
"md5": "d13de95581eb28f1df1f3a1d4026c830",
"sha256": "9cac86adec822108006dd6b1c54fa900fc96c0b7e4c8928680403cd33a557553"
},
"downloads": -1,
"filename": "devtools-0.12.1.tar.gz",
"has_sig": false,
"md5_digest": "d13de95581eb28f1df1f3a1d4026c830",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 74930,
"upload_time": "2023-08-17T14:55:30",
"upload_time_iso_8601": "2023-08-17T14:55:30.323498Z",
"url": "https://files.pythonhosted.org/packages/77/a7/6eb1bae3af2079eb6687219d5509600b3094d9879c1914b09e72ab18cc36/devtools-0.12.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-17 14:55:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "samuelcolvin",
"github_project": "python-devtools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "devtools"
}