hbtools


Namehbtools JSON
Version 0.4.3 PyPI version JSON
download
home_pageNone
SummaryPackage containing a few python utils functions.
upload_time2024-06-20 02:28:10
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/c3/27/9e374aee878fa27236b6437023d7c8688ca659261f7477acc75970038df5/hbtools-0.4.3.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.3",
    "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": "872e925c50170dcc59e5064d33fe2fd511ce87c19c03bf63ade33b66286973ac",
                "md5": "b0efb27f5ea1d75913d70cd9a4e10804",
                "sha256": "9887490d5312833d3b5785838dddc3ac656eb12a482a39f14bbe37e229cbb59a"
            },
            "downloads": -1,
            "filename": "hbtools-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0efb27f5ea1d75913d70cd9a4e10804",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7150,
            "upload_time": "2024-06-20T02:28:08",
            "upload_time_iso_8601": "2024-06-20T02:28:08.320655Z",
            "url": "https://files.pythonhosted.org/packages/87/2e/925c50170dcc59e5064d33fe2fd511ce87c19c03bf63ade33b66286973ac/hbtools-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c3279e374aee878fa27236b6437023d7c8688ca659261f7477acc75970038df5",
                "md5": "ee3f3103ed5812f802608e9e62cdb420",
                "sha256": "cced5fe8df99f143c0383d47fef05bf90f6c0d44258b557ecc37c28889ebb01f"
            },
            "downloads": -1,
            "filename": "hbtools-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ee3f3103ed5812f802608e9e62cdb420",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 40669,
            "upload_time": "2024-06-20T02:28:10",
            "upload_time_iso_8601": "2024-06-20T02:28:10.318939Z",
            "url": "https://files.pythonhosted.org/packages/c3/27/9e374aee878fa27236b6437023d7c8688ca659261f7477acc75970038df5/hbtools-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-20 02:28:10",
    "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: 4.42981s