hbtools


Namehbtools JSON
Version 0.4.2 PyPI version JSON
download
home_pageNone
SummaryPackage containing a few python utils functions.
upload_time2024-03-18 09:52:54
maintainerNone
docs_urlNone
authorBagard Hoel
requires_python>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hbtools

[![PyPI](https://img.shields.io/pypi/v/hbtools?color=green&style=flat)](https://pypi.org/project/hbtools)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hbtools?style=flat)](https://pypi.org/project/hbtools)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/hbtools?style=flat-square)](https://pypistats.org/packages/hbtools)
[![License](https://img.shields.io/pypi/l/hbtools?style=flat)](https://opensource.org/licenses/MIT)
![Linting](https://github.com/hoel-bagard/hbtools/actions/workflows/pre-commit.yaml/badge.svg)
![Tests](https://github.com/hoel-bagard/hbtools/actions/workflows/nox.yaml/badge.svg)

Package containing a few python utils functions.

## Installation

The package is available on pypi [here](https://pypi.org/project/hbtools/) you can install it with:

```
pip install "hbtools[opencv]"
```

(or simply `pip install hbtools` if not using the image part of the package / `pip install "hbtools[opencv-headless]"` if using opencv-headless)

## Usage

### Logger
```python
from hbtools import create_logger
logger = hbtools.create_logger("MyLogger", verbose_level="debug")
logger.debug("Debug message")
```

### Prints
```python
from hbtools import clean_print
clean_print("Processing sample (1/10)", end = "\r")
clean_print("Processing sample (10/10)", end = "\n")

from hbtools import yes_no_prompt
yes_no_prompt("Would you like to continue ?")
```

### Image
```python
import numpy as np
from hbtools import show_img
img = np.zeros((200, 200, 3))
show_img(img)
```

Additionally, if using a server through ssh, you can install this package with extras for displaying images to the terminal:
```
pip install "hbtools[opencv, terminal]"
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hbtools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Bagard Hoel",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/4d/50/d04c25af1714846de8706c9e8cec7352f968a2dec83f44e98375294695bf/hbtools-0.4.2.tar.gz",
    "platform": null,
    "description": "# hbtools\n\n[![PyPI](https://img.shields.io/pypi/v/hbtools?color=green&style=flat)](https://pypi.org/project/hbtools)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hbtools?style=flat)](https://pypi.org/project/hbtools)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/hbtools?style=flat-square)](https://pypistats.org/packages/hbtools)\n[![License](https://img.shields.io/pypi/l/hbtools?style=flat)](https://opensource.org/licenses/MIT)\n![Linting](https://github.com/hoel-bagard/hbtools/actions/workflows/pre-commit.yaml/badge.svg)\n![Tests](https://github.com/hoel-bagard/hbtools/actions/workflows/nox.yaml/badge.svg)\n\nPackage containing a few python utils functions.\n\n## Installation\n\nThe package is available on pypi [here](https://pypi.org/project/hbtools/) you can install it with:\n\n```\npip install \"hbtools[opencv]\"\n```\n\n(or simply `pip install hbtools` if not using the image part of the package / `pip install \"hbtools[opencv-headless]\"` if using opencv-headless)\n\n## Usage\n\n### Logger\n```python\nfrom hbtools import create_logger\nlogger = hbtools.create_logger(\"MyLogger\", verbose_level=\"debug\")\nlogger.debug(\"Debug message\")\n```\n\n### Prints\n```python\nfrom hbtools import clean_print\nclean_print(\"Processing sample (1/10)\", end = \"\\r\")\nclean_print(\"Processing sample (10/10)\", end = \"\\n\")\n\nfrom hbtools import yes_no_prompt\nyes_no_prompt(\"Would you like to continue ?\")\n```\n\n### Image\n```python\nimport numpy as np\nfrom hbtools import show_img\nimg = np.zeros((200, 200, 3))\nshow_img(img)\n```\n\nAdditionally, if using a server through ssh, you can install this package with extras for displaying images to the terminal:\n```\npip install \"hbtools[opencv, terminal]\"\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package containing a few python utils functions.",
    "version": "0.4.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/hoel-bagard/hbtools/issues",
        "Homepage": "https://github.com/hoel-bagard/hbtools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9378c662cf481c24c7e5191aedab72373df48e47753d4c32bdef6435ac986575",
                "md5": "8d5caf582d91e9a485000041cf640ae9",
                "sha256": "c67a501023fef0f16d3fce178981c19311cb9ed5663857b6ef6d61445d455180"
            },
            "downloads": -1,
            "filename": "hbtools-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d5caf582d91e9a485000041cf640ae9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7116,
            "upload_time": "2024-03-18T09:52:55",
            "upload_time_iso_8601": "2024-03-18T09:52:55.689193Z",
            "url": "https://files.pythonhosted.org/packages/93/78/c662cf481c24c7e5191aedab72373df48e47753d4c32bdef6435ac986575/hbtools-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4d50d04c25af1714846de8706c9e8cec7352f968a2dec83f44e98375294695bf",
                "md5": "8b554eaaca403f54cbf7d08054315792",
                "sha256": "99ecb30b2fcfc1aebedd07a73a6a53267457346c96c4feec59142b121be76516"
            },
            "downloads": -1,
            "filename": "hbtools-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8b554eaaca403f54cbf7d08054315792",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 40646,
            "upload_time": "2024-03-18T09:52:54",
            "upload_time_iso_8601": "2024-03-18T09:52:54.618107Z",
            "url": "https://files.pythonhosted.org/packages/4d/50/d04c25af1714846de8706c9e8cec7352f968a2dec83f44e98375294695bf/hbtools-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 09:52:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hoel-bagard",
    "github_project": "hbtools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hbtools"
}
        
Elapsed time: 0.18943s