Name | woodchopper JSON |
Version |
2.0.4
JSON |
| download |
home_page | None |
Summary | A lightweight logging package |
upload_time | 2024-08-22 04:34:29 |
maintainer | None |
docs_url | None |
author | AfterNoon PM |
requires_python | <4.0.0,>=3.8.1 |
license | LGPL-3.0-only |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 
*A lightweight logging package*
[](https://github.com/TinkerTown-SEMI/woodchopper/actions/workflows/python-package.yml)
[](https://pypi.org/project/woodchopper)
[](https://pypi.org/project/woodchopper)
[](https://python-poetry.org/)
[](https://www.gnu.org/licenses/lgpl-3.0.en.html)
## Table of contents
[Back to Top](#woodchopper)
[Table of contents](#table-of-contents)
[Installation](#installation)
- [Using `pip`](#using-pip)
- [Unix/mac/linux](#unixmaclinux)
- [Windows](#windows)
- [Building from source](#building-from-source)
- [Unix/mac/linux](#unixmaclinux-1)
- [Windows](#windows-1)
[Usage](#usage)
- [Creating a log](#creating-a-log)
- [Logging plaintext](#logging-plaintext)
- [Logging debug information](#logging-debug-information)
- [Logging information](#logging-information)
- [Logging warnings](#logging-warnings)
- [Logging errors](#logging-errors)
[Getting help](#getting-help)
## Installation
### Using `pip`
To install this package using pip, simply run the following command:
#### Unix/mac/linux
```bash
pip3 install woodchopper
```
#### Windows
```cmd
pip install woodchopper
```
### Building from source
#### Unix/mac/linux
##### Requirements
- Python >=3.8.1
- Git
- Poetry >=1.5.1
Run the following in the terminal:
```bash
git clone https://github.com/TinkerTown-SEMI/woodchopper.git
cd woodchopper
make install-dev
make -j4 all
make build
```
#### Windows
##### Requirements
- Python >=3.8.1
- Git
- Poetry >=1.5.1
- [w64devkit](https://github.com/skeeto/w64devkit) (GNU binaries for windows, including `make`). When you extract the folder, add the folder to the path.
Run the following in the terminal:
```cmd
git clone https://github.com/TinkerTown-SEMI/woodchopper.git
cd woodchopper
make install-dev
make -j4 all
make build
```
## Usage
### Creating a log
To use woodchopper, you first have to create a log.
```py
from woodchopper import Logging_Levels, DateTime_Defaults, Styles, Logger
from pathlib import Path
log = Logger(
Path("./spam.log").resolve(), # Path to log file
show_datetime=DateTime_Defaults.DO_NOT_SHOW, # Don't show date and time. Other options: DateTime_Defaults.DATE_AND_TIME, DateTime_Defaults.DATE_ONLY, DateTime_Defaults.TIME_ONLY
logging_level=Logging_Levels.DEBUG, # Allow all logging operations. Other options: Logging_Levels.DEFAULT, Logging_Levels.WARNING, Logging_Levels.ERROR, Logging_Levels.SILENT.
quiet=True # Suppress log messages on creation and deletion.
)
```
### Logging plaintext
```py
log.log("Hello, world!")
```
##### Output
<pre>Hello, world!</pre>
### Logging debug information
```py
log.debug("Ate 1 can of spam. Cans of spam remaining: 25.")
```
#### Output[^1]
<pre><span style="color: orange; font-weight: bold;">DEBUG: </span>Ate 1 can of spam. Cans of spam remaining: 25.</pre>
### Logging information
```py
log.info("Sent order for 50 cans of spam.")
```
##### Output[^1]
<pre><span style="color: blue; font-weight: bold;">INFO: </span>Sent order for 50 cans of spam.</pre>
### Logging warnings
```py
log.warn("Running low on spam: 7 cans left.")
```
##### Output[^1]
<pre><span style="color: yellow; font-weight: bold;">WARNING: </span>Running low on spam: 7 cans left.</pre>
### Logging errors
```py
log.error("Houston, we have a problem: cans of spam left: 0.")
```
##### Output[^1]
<pre><span style="color: red; font-weight: bold;">ERROR: </span> Houston, we have a problem: cans of spam left: 0.</pre>
## Getting help
You can get help regarding this package in many ways. If you need help with syntax, your first stop should always be help manuals, so you could use python's [built-in help function](https://docs.python.org/3.11/library/functions.html#help), as we do not yet have full documentation published(sorry). For errors, it should be the [bug tracker](https://github.com/TinkerTown-SEMI/woodchopper/issues), and for more generic python errors, you could go over to [StackOverflow](https://stackoverflow.com).
## Happy logging, folks

[^1]: Sorry, colored/styled text isn't available in github markdown.
Raw data
{
"_id": null,
"home_page": null,
"name": "woodchopper",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.8.1",
"maintainer_email": null,
"keywords": null,
"author": "AfterNoon PM",
"author_email": "h2o.Drop2010+woodchopper@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/71/53/2c845cab29e484f9ea6debd28eebee5944b65f311a139415ef86ab5e5ac2/woodchopper-2.0.4.tar.gz",
"platform": null,
"description": "# \n\n*A lightweight logging package*\n\n[](https://github.com/TinkerTown-SEMI/woodchopper/actions/workflows/python-package.yml)\n[](https://pypi.org/project/woodchopper)\n[](https://pypi.org/project/woodchopper)\n[](https://python-poetry.org/)\n[](https://www.gnu.org/licenses/lgpl-3.0.en.html)\n\n## Table of contents\n\n[Back to Top](#woodchopper)\n\n[Table of contents](#table-of-contents)\n\n[Installation](#installation)\n\n- [Using `pip`](#using-pip)\n\n \t- [Unix/mac/linux](#unixmaclinux)\n \t- [Windows](#windows)\n\n- [Building from source](#building-from-source)\n\n \t- [Unix/mac/linux](#unixmaclinux-1)\n \t- [Windows](#windows-1)\n\n[Usage](#usage)\n\n- [Creating a log](#creating-a-log)\n- [Logging plaintext](#logging-plaintext)\n- [Logging debug information](#logging-debug-information)\n- [Logging information](#logging-information)\n- [Logging warnings](#logging-warnings)\n- [Logging errors](#logging-errors)\n\n[Getting help](#getting-help)\n\n## Installation\n\n### Using `pip`\n\nTo install this package using pip, simply run the following command:\n\n#### Unix/mac/linux\n\n```bash\npip3 install woodchopper\n```\n\n#### Windows\n\n```cmd\npip install woodchopper\n```\n\n### Building from source\n\n#### Unix/mac/linux\n\n##### Requirements\n\n- Python >=3.8.1\n- Git\n- Poetry >=1.5.1\n\nRun the following in the terminal:\n\n```bash\ngit clone https://github.com/TinkerTown-SEMI/woodchopper.git\ncd woodchopper\n\nmake install-dev\nmake -j4 all\nmake build\n```\n\n#### Windows\n\n##### Requirements\n\n- Python >=3.8.1\n- Git\n- Poetry >=1.5.1\n- [w64devkit](https://github.com/skeeto/w64devkit) (GNU binaries for windows, including `make`). When you extract the folder, add the folder to the path.\n\nRun the following in the terminal:\n\n```cmd\ngit clone https://github.com/TinkerTown-SEMI/woodchopper.git\ncd woodchopper\n\nmake install-dev\nmake -j4 all\nmake build\n```\n\n## Usage\n\n### Creating a log\n\nTo use woodchopper, you first have to create a log.\n\n```py\nfrom woodchopper import Logging_Levels, DateTime_Defaults, Styles, Logger\nfrom pathlib import Path\n\nlog = Logger(\n Path(\"./spam.log\").resolve(), # Path to log file\n show_datetime=DateTime_Defaults.DO_NOT_SHOW, # Don't show date and time. Other options: DateTime_Defaults.DATE_AND_TIME, DateTime_Defaults.DATE_ONLY, DateTime_Defaults.TIME_ONLY\n logging_level=Logging_Levels.DEBUG, # Allow all logging operations. Other options: Logging_Levels.DEFAULT, Logging_Levels.WARNING, Logging_Levels.ERROR, Logging_Levels.SILENT.\n quiet=True # Suppress log messages on creation and deletion.\n)\n```\n\n### Logging plaintext\n\n```py\nlog.log(\"Hello, world!\")\n```\n\n##### Output\n\n<pre>Hello, world!</pre>\n\n### Logging debug information\n\n```py\nlog.debug(\"Ate 1 can of spam. Cans of spam remaining: 25.\")\n```\n\n#### Output[^1]\n\n<pre><span style=\"color: orange; font-weight: bold;\">DEBUG: </span>Ate 1 can of spam. Cans of spam remaining: 25.</pre>\n\n### Logging information\n\n```py\nlog.info(\"Sent order for 50 cans of spam.\")\n```\n\n##### Output[^1]\n\n<pre><span style=\"color: blue; font-weight: bold;\">INFO: </span>Sent order for 50 cans of spam.</pre>\n\n### Logging warnings\n\n```py\nlog.warn(\"Running low on spam: 7 cans left.\")\n```\n\n##### Output[^1]\n\n<pre><span style=\"color: yellow; font-weight: bold;\">WARNING: </span>Running low on spam: 7 cans left.</pre>\n\n### Logging errors\n\n```py\nlog.error(\"Houston, we have a problem: cans of spam left: 0.\")\n```\n\n##### Output[^1]\n\n<pre><span style=\"color: red; font-weight: bold;\">ERROR: </span> Houston, we have a problem: cans of spam left: 0.</pre>\n\n## Getting help\n\nYou can get help regarding this package in many ways. If you need help with syntax, your first stop should always be help manuals, so you could use python's [built-in help function](https://docs.python.org/3.11/library/functions.html#help), as we do not yet have full documentation published(sorry). For errors, it should be the [bug tracker](https://github.com/TinkerTown-SEMI/woodchopper/issues), and for more generic python errors, you could go over to [StackOverflow](https://stackoverflow.com).\n\n## Happy logging, folks\n\n\n[^1]: Sorry, colored/styled text isn't available in github markdown.\n\n",
"bugtrack_url": null,
"license": "LGPL-3.0-only",
"summary": "A lightweight logging package",
"version": "2.0.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6acfd4fc4709aa85069a1233e5b8df24995007f904d391834b7aa0f8b144eec3",
"md5": "0f93fba2e4af557b7d93ce4417ce8414",
"sha256": "4ad8444220a9bfc92da088d7c3f359a6923c70e1b4e91135269a91b53f4422a9"
},
"downloads": -1,
"filename": "woodchopper-2.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f93fba2e4af557b7d93ce4417ce8414",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.8.1",
"size": 8657,
"upload_time": "2024-08-22T04:34:28",
"upload_time_iso_8601": "2024-08-22T04:34:28.232926Z",
"url": "https://files.pythonhosted.org/packages/6a/cf/d4fc4709aa85069a1233e5b8df24995007f904d391834b7aa0f8b144eec3/woodchopper-2.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "71532c845cab29e484f9ea6debd28eebee5944b65f311a139415ef86ab5e5ac2",
"md5": "7c179a7911adb641179885306ba9bdcf",
"sha256": "8846e7f92a09da534c572f60c1068745c803f0fc8cc3979009047cf1c237a6e7"
},
"downloads": -1,
"filename": "woodchopper-2.0.4.tar.gz",
"has_sig": false,
"md5_digest": "7c179a7911adb641179885306ba9bdcf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.8.1",
"size": 8072,
"upload_time": "2024-08-22T04:34:29",
"upload_time_iso_8601": "2024-08-22T04:34:29.586694Z",
"url": "https://files.pythonhosted.org/packages/71/53/2c845cab29e484f9ea6debd28eebee5944b65f311a139415ef86ab5e5ac2/woodchopper-2.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 04:34:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "woodchopper"
}