Name | bosos-dev-tools JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | Dev Tools is a collection of utility tools for Python developers, designed to simplify debugging, logging, and monitoring tasks. This package includes custom logging handlers, decorators for measuring execution time, and a progress bar utility to enhance the development workflow. |
upload_time | 2024-10-24 11:37:47 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 bjorngun 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 |
development
tools
logging
decorators
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Bosos Dev Tools
[![Python Versions](https://img.shields.io/pypi/pyversions/bosos-dev-tools.svg?logo=python&logoColor=white)](https://pypi.org/project/bosos-dev-tools/#files)
[![Platform](https://img.shields.io/badge/platform-linux%20%7C%20windows-lightgrey)](https://pypi.org/project/bosos-dev-tools/#files)
[![PypI Versions](https://img.shields.io/pypi/v/bosos-dev-tools)](https://pypi.org/project/bosos-dev-tools/#history)
[![PyPI status](https://img.shields.io/pypi/status/bosos-dev-tools.svg)](https://pypi.python.org/pypi/bosos-dev-tools/)
[![Github Actions Test and Publish Status](https://github.com/bjorngun/developer-tools/actions/workflows/test-and-publish.yml/badge.svg)](https://github.com/bjorngun/developer-tools/actions)
[![codecov](https://codecov.io/gh/bjorngun/developer-tools/graph/badge.svg?token=LZKYK9IK5K)](https://codecov.io/gh/bjorngun/developer-tools)
[![License](https://img.shields.io/pypi/l/bosos-dev-tools)](LICENSE)
Bosos Dev Tools is a collection of utility tools for Python developers, designed to simplify debugging, logging, and monitoring tasks. This package includes custom logging handlers, decorators for measuring execution time, and a progress bar utility to enhance the development workflow.
## Features
- **Custom Logging Handlers**: Log messages to various destinations, including databases, with customizable formats.
- **Timing Decorators**: Easily measure the execution time of your functions with minimal code changes.
- **Progress Bar Utility**: Visualize the progress of long-running operations in the console.
- **Debug Tools**: Check if debug or timing modes are enabled via environment variables.
## Installation
You can install the package via pip:
```sh
pip install bosos-dev-tools
```
## Usage
### Custom Logging Handler
The `LogDBHandler` allows you to log messages directly to a database.
``` py
import logging
from dev_tools.custom_handlers import LogDBHandler
logger = logging.getLogger('test_logger')
db_handler = LogDBHandler(db_table='test_table')
logger.addHandler(db_handler)
logger.setLevel(logging.INFO)
logger.info('This is a test log message.')
```
### Timing Decorator
Use the `timing_decorator` to measure the execution time of functions.
``` py
from dev_tools.custom_decorators import timing_decorator
@timing_decorator
def example_function():
for i in range(1000000):
pass
example_function()
```
### Progress Bar
Use the `progress_bar` to measure the execution time of functions.
``` py
from dev_tools.progress_bar import progress_bar
for item in progress_bar(range(10)):
pass
```
### Debug Tools
Check if debug or timing modes are enabled via environment variables.
Use the `logger_setup` to set up your logging settings at the beginning of the script.
``` py
from dev_tools.debug_tools import is_debug_on, is_timing_on
print('Is debug on:', is_debug_on())
print('Is timing on:', is_timing_on())
```
``` py
from dev_tools.debug_tools import logger_setup
def main():
logger_setup()
if __name__ == '__main__':
main()
```
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/bjorngun/developer-tools/blob/main/LICENSE) file for more details.
## Links
- **Source Code**: [GitHub Repository](https://github.com/bjorngun/developer-tools)
- **Issue Tracker**: [GitHub Issues](https://github.com/bjorngun/developer-tools/issues)
Raw data
{
"_id": null,
"home_page": null,
"name": "bosos-dev-tools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "development, tools, logging, decorators",
"author": null,
"author_email": "Bj\u00f6rn Gunnarsson <bosos3@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/16/43/630ebcbdcbcd29e4c2a94ce8981e28876edad370c2fc961ead9c00a5bbef/bosos_dev_tools-0.1.4.tar.gz",
"platform": null,
"description": "# Bosos Dev Tools\r\n\r\n[![Python Versions](https://img.shields.io/pypi/pyversions/bosos-dev-tools.svg?logo=python&logoColor=white)](https://pypi.org/project/bosos-dev-tools/#files)\r\n[![Platform](https://img.shields.io/badge/platform-linux%20%7C%20windows-lightgrey)](https://pypi.org/project/bosos-dev-tools/#files)\r\n[![PypI Versions](https://img.shields.io/pypi/v/bosos-dev-tools)](https://pypi.org/project/bosos-dev-tools/#history)\r\n[![PyPI status](https://img.shields.io/pypi/status/bosos-dev-tools.svg)](https://pypi.python.org/pypi/bosos-dev-tools/)\r\n[![Github Actions Test and Publish Status](https://github.com/bjorngun/developer-tools/actions/workflows/test-and-publish.yml/badge.svg)](https://github.com/bjorngun/developer-tools/actions)\r\n[![codecov](https://codecov.io/gh/bjorngun/developer-tools/graph/badge.svg?token=LZKYK9IK5K)](https://codecov.io/gh/bjorngun/developer-tools)\r\n[![License](https://img.shields.io/pypi/l/bosos-dev-tools)](LICENSE)\r\n\r\nBosos Dev Tools is a collection of utility tools for Python developers, designed to simplify debugging, logging, and monitoring tasks. This package includes custom logging handlers, decorators for measuring execution time, and a progress bar utility to enhance the development workflow.\r\n\r\n## Features\r\n\r\n- **Custom Logging Handlers**: Log messages to various destinations, including databases, with customizable formats.\r\n- **Timing Decorators**: Easily measure the execution time of your functions with minimal code changes.\r\n- **Progress Bar Utility**: Visualize the progress of long-running operations in the console.\r\n- **Debug Tools**: Check if debug or timing modes are enabled via environment variables.\r\n\r\n## Installation\r\n\r\nYou can install the package via pip:\r\n\r\n```sh\r\npip install bosos-dev-tools\r\n```\r\n\r\n## Usage\r\n\r\n### Custom Logging Handler\r\n\r\nThe `LogDBHandler` allows you to log messages directly to a database.\r\n\r\n``` py\r\nimport logging\r\nfrom dev_tools.custom_handlers import LogDBHandler\r\n\r\nlogger = logging.getLogger('test_logger')\r\ndb_handler = LogDBHandler(db_table='test_table')\r\nlogger.addHandler(db_handler)\r\nlogger.setLevel(logging.INFO)\r\n\r\nlogger.info('This is a test log message.')\r\n```\r\n\r\n### Timing Decorator\r\n\r\nUse the `timing_decorator` to measure the execution time of functions.\r\n\r\n``` py\r\nfrom dev_tools.custom_decorators import timing_decorator\r\n\r\n@timing_decorator\r\ndef example_function():\r\n for i in range(1000000):\r\n pass\r\n\r\nexample_function()\r\n```\r\n\r\n### Progress Bar\r\n\r\nUse the `progress_bar` to measure the execution time of functions.\r\n\r\n``` py\r\nfrom dev_tools.progress_bar import progress_bar\r\n\r\nfor item in progress_bar(range(10)):\r\n pass\r\n```\r\n\r\n### Debug Tools\r\n\r\nCheck if debug or timing modes are enabled via environment variables.\r\nUse the `logger_setup` to set up your logging settings at the beginning of the script.\r\n\r\n``` py\r\nfrom dev_tools.debug_tools import is_debug_on, is_timing_on\r\n\r\nprint('Is debug on:', is_debug_on())\r\nprint('Is timing on:', is_timing_on())\r\n```\r\n\r\n``` py\r\nfrom dev_tools.debug_tools import logger_setup\r\n\r\ndef main():\r\n logger_setup()\r\n\r\nif __name__ == '__main__':\r\n main()\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/bjorngun/developer-tools/blob/main/LICENSE) file for more details.\r\n\r\n## Links\r\n\r\n- **Source Code**: [GitHub Repository](https://github.com/bjorngun/developer-tools)\r\n- **Issue Tracker**: [GitHub Issues](https://github.com/bjorngun/developer-tools/issues)\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 bjorngun 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": "Dev Tools is a collection of utility tools for Python developers, designed to simplify debugging, logging, and monitoring tasks. This package includes custom logging handlers, decorators for measuring execution time, and a progress bar utility to enhance the development workflow.",
"version": "0.1.4",
"project_urls": {
"Source": "https://github.com/bjorngun/developer-tools",
"Tracker": "https://github.com/bjorngun/developer-tools/issues"
},
"split_keywords": [
"development",
" tools",
" logging",
" decorators"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a9bd036805e1aad7133919bee2f4ae0034de7685c4a1cf9005c63216d59bb29e",
"md5": "e6a91bdc55073cc9bb3f1ddfc125286b",
"sha256": "89c1a652a8652aac60d4d6d0bd158e2aac1f072706393a54ba1664151b992efc"
},
"downloads": -1,
"filename": "bosos_dev_tools-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e6a91bdc55073cc9bb3f1ddfc125286b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 15119,
"upload_time": "2024-10-24T11:37:46",
"upload_time_iso_8601": "2024-10-24T11:37:46.117876Z",
"url": "https://files.pythonhosted.org/packages/a9/bd/036805e1aad7133919bee2f4ae0034de7685c4a1cf9005c63216d59bb29e/bosos_dev_tools-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1643630ebcbdcbcd29e4c2a94ce8981e28876edad370c2fc961ead9c00a5bbef",
"md5": "30a427cdb4ef58272d91652d6847c91d",
"sha256": "120213abcef0a30dbfeabf74d088649f493e6f0385992dc4a9d0c235d26c26f2"
},
"downloads": -1,
"filename": "bosos_dev_tools-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "30a427cdb4ef58272d91652d6847c91d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10941,
"upload_time": "2024-10-24T11:37:47",
"upload_time_iso_8601": "2024-10-24T11:37:47.894644Z",
"url": "https://files.pythonhosted.org/packages/16/43/630ebcbdcbcd29e4c2a94ce8981e28876edad370c2fc961ead9c00a5bbef/bosos_dev_tools-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-24 11:37:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bjorngun",
"github_project": "developer-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "bosos-dev-tools"
}