Name | pretty-verbose JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Package for colored organized verbose printing in python. |
upload_time | 2024-11-17 17:28:34 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2022 Cindy Catalina Moreno Sarria 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 |
verbose
log
logger
colors
print
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pretty Verbose
[![PyPI version](https://img.shields.io/pypi/v/pretty-verbose.svg)](https://pypi.org/project/pretty-verbose/)
[![License](https://img.shields.io/pypi/l/pretty-verbose.svg)](https://github.com/ccmorenos/pretty_verbose/blob/main/LICENSE)
[![Test Python Package](https://github.com/ccmorenos/pretty_verbose/actions/workflows/test-python.yml/badge.svg?branch=main)](https://github.com/ccmorenos/pretty_verbose/actions/workflows/test-python.yml) [![Upload Python Package](https://github.com/ccmorenos/pretty_verbose/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ccmorenos/pretty_verbose/actions/workflows/python-publish.yml)
Package for beautiful verbose printing in python.
## Installation
The package is available in the [Python Package Index (PyPi)](https://pypi.org/project/pretty-verbose/).
```bash
python3 -m pip install pretty_verbose
```
## Examples
To use the verbose output, create a `VerboseMessages` object.
```python
from pretty_verbose import VerboseMessages
messages = VerboseMessages(
level=3,
scope="main",
filename="messages.log"
)
```
The level indicates which messages will be printed.
* -1: Just Debug.
* 0: Debug and Errors.
* 1: Debug, Errors and Warnings.
* 2: Debug, Errors Warnings and Success.
* 3: Debug, Errors Warnings, Success and Info.
The scope works to use the VerboseMessages in several instance and
differentiate where the message is coming from. Finally the filename will store
all the messages printed in the terminal.
The following messages can be printed.
```python
import time
messages.debug("This is a debug message.")
messages.error("This is an error message.")
messages.warning("This is a warning message.")
messages.success("This is a success message.")
messages.info("This is an info message.")
for i in range(100):
if i % 10 == 0:
messages.for_message("This is an info message inside a for loop.")
messages.progress("This is a progress message.", (i+1))
time.sleep(0.1)
```
The result will be the following.
```
[28/08/2022 14:12:09] DEBUG [main]: This is an debug message.
[28/08/2022 14:12:09] ERROR [main]: This is an error message.
[28/08/2022 14:12:09] WARNING [main]: This is a warning message.
[28/08/2022 14:12:09] SUCCESS [main]: This is a success message.
[28/08/2022 14:14:06] SUCCESS [main]: This is a success message.
[28/08/2022 14:12:10] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:11] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:13] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:14] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:15] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:16] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:17] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:18] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:19] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:20] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:14:19] INFO [main] -- This is a progress message.: [100.00%]
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pretty-verbose",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\"C. Catalina M. Sarria\" <ccatamorenos@gmail.com>",
"keywords": "verbose, log, logger, colors, print",
"author": null,
"author_email": "\"C. Catalina M. Sarria\" <ccatamorenos@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d3/34/a40d24770a684e3debd555dae16617e84d9454e3ff8acd26ca76d7184c70/pretty_verbose-0.1.0.tar.gz",
"platform": null,
"description": "# Pretty Verbose\n[![PyPI version](https://img.shields.io/pypi/v/pretty-verbose.svg)](https://pypi.org/project/pretty-verbose/)\n[![License](https://img.shields.io/pypi/l/pretty-verbose.svg)](https://github.com/ccmorenos/pretty_verbose/blob/main/LICENSE)\n[![Test Python Package](https://github.com/ccmorenos/pretty_verbose/actions/workflows/test-python.yml/badge.svg?branch=main)](https://github.com/ccmorenos/pretty_verbose/actions/workflows/test-python.yml) [![Upload Python Package](https://github.com/ccmorenos/pretty_verbose/actions/workflows/python-publish.yml/badge.svg)](https://github.com/ccmorenos/pretty_verbose/actions/workflows/python-publish.yml)\n\nPackage for beautiful verbose printing in python.\n\n## Installation\n\nThe package is available in the [Python Package Index (PyPi)](https://pypi.org/project/pretty-verbose/).\n\n```bash\npython3 -m pip install pretty_verbose\n```\n\n## Examples\n\nTo use the verbose output, create a `VerboseMessages` object.\n\n```python\nfrom pretty_verbose import VerboseMessages\n\nmessages = VerboseMessages(\n level=3,\n scope=\"main\",\n filename=\"messages.log\"\n)\n```\n\nThe level indicates which messages will be printed.\n\n* -1: Just Debug.\n* 0: Debug and Errors.\n* 1: Debug, Errors and Warnings.\n* 2: Debug, Errors Warnings and Success.\n* 3: Debug, Errors Warnings, Success and Info.\n\nThe scope works to use the VerboseMessages in several instance and\ndifferentiate where the message is coming from. Finally the filename will store\nall the messages printed in the terminal.\n\nThe following messages can be printed.\n\n```python\nimport time\n\nmessages.debug(\"This is a debug message.\")\nmessages.error(\"This is an error message.\")\nmessages.warning(\"This is a warning message.\")\nmessages.success(\"This is a success message.\")\nmessages.info(\"This is an info message.\")\n\nfor i in range(100):\n if i % 10 == 0:\n messages.for_message(\"This is an info message inside a for loop.\")\n messages.progress(\"This is a progress message.\", (i+1))\n time.sleep(0.1)\n```\n\nThe result will be the following.\n\n```\n[28/08/2022 14:12:09] DEBUG [main]: This is an debug message.\n[28/08/2022 14:12:09] ERROR [main]: This is an error message.\n[28/08/2022 14:12:09] WARNING [main]: This is a warning message.\n[28/08/2022 14:12:09] SUCCESS [main]: This is a success message.\n[28/08/2022 14:14:06] SUCCESS [main]: This is a success message.\n[28/08/2022 14:12:10] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:11] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:13] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:14] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:15] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:16] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:17] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:18] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:19] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:12:20] INFO [main] -- This is an info message inside a for loop.\n[28/08/2022 14:14:19] INFO [main] -- This is a progress message.: [100.00%]\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 Cindy Catalina Moreno Sarria 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": "Package for colored organized verbose printing in python.",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"verbose",
" log",
" logger",
" colors",
" print"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "77d7e6cfd1f2a2a877a21b7a29af4698ef5626e8c34bf892e3def7eb9dd9ac8a",
"md5": "dec57e3a90862b1c9961a06b870c176b",
"sha256": "ea6f628f24a00d959f46b5944a80b80cf81fab0eb011d433e521078730039388"
},
"downloads": -1,
"filename": "pretty_verbose-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dec57e3a90862b1c9961a06b870c176b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10185,
"upload_time": "2024-11-17T17:28:32",
"upload_time_iso_8601": "2024-11-17T17:28:32.245263Z",
"url": "https://files.pythonhosted.org/packages/77/d7/e6cfd1f2a2a877a21b7a29af4698ef5626e8c34bf892e3def7eb9dd9ac8a/pretty_verbose-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d334a40d24770a684e3debd555dae16617e84d9454e3ff8acd26ca76d7184c70",
"md5": "dba7e6f27b943ff03c6d56ec38472eda",
"sha256": "dceb2fb153610c08992358121b3d4693a3f0721b78673684dbb3adb41a9c127d"
},
"downloads": -1,
"filename": "pretty_verbose-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "dba7e6f27b943ff03c6d56ec38472eda",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9766,
"upload_time": "2024-11-17T17:28:34",
"upload_time_iso_8601": "2024-11-17T17:28:34.042617Z",
"url": "https://files.pythonhosted.org/packages/d3/34/a40d24770a684e3debd555dae16617e84d9454e3ff8acd26ca76d7184c70/pretty_verbose-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 17:28:34",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pretty-verbose"
}