bosos-dev-tools


Namebosos-dev-tools JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryDev 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_time2024-06-21 11:38:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT 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/f0/0d/39da9e785e0c35aa3a9e9a41013a53c44130a6739c1da8bd0d0b0f6b8eda/bosos_dev_tools-0.1.2.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.2",
    "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": "a856aa05d92a5d7c8f9ed22fc613dbe899eaa202e2042b1a0bc21c52baed039c",
                "md5": "e25e5c32f51255285af90a1fc0f31dfe",
                "sha256": "223c3a97403cfca4fb73eb6a6885c485aacfc4362769a90fea6025cd651a8633"
            },
            "downloads": -1,
            "filename": "bosos_dev_tools-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e25e5c32f51255285af90a1fc0f31dfe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 14061,
            "upload_time": "2024-06-21T11:38:45",
            "upload_time_iso_8601": "2024-06-21T11:38:45.246586Z",
            "url": "https://files.pythonhosted.org/packages/a8/56/aa05d92a5d7c8f9ed22fc613dbe899eaa202e2042b1a0bc21c52baed039c/bosos_dev_tools-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f00d39da9e785e0c35aa3a9e9a41013a53c44130a6739c1da8bd0d0b0f6b8eda",
                "md5": "f0264e773cf7f43db222f8c252758672",
                "sha256": "aed9b3b1031b35f7a1b2a76c8146e8e9b8a4638e563856a836a63118b574028d"
            },
            "downloads": -1,
            "filename": "bosos_dev_tools-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f0264e773cf7f43db222f8c252758672",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10504,
            "upload_time": "2024-06-21T11:38:47",
            "upload_time_iso_8601": "2024-06-21T11:38:47.207670Z",
            "url": "https://files.pythonhosted.org/packages/f0/0d/39da9e785e0c35aa3a9e9a41013a53c44130a6739c1da8bd0d0b0f6b8eda/bosos_dev_tools-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-21 11:38: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"
}
        
Elapsed time: 1.00298s