Metadata-Version: 2.1
Name: hbtools
Version: 0.1.2
Summary: Package containing a few python utils functions.
Project-URL: Homepage, https://github.com/hoel-bagard/hbtools
Project-URL: Bug Tracker, https://github.com/hoel-bagard/hbtools/issues
Author: Bagard Hoel
License: MIT
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.10
Requires-Dist: numpy>=1.21
Requires-Dist: typing-extensions; python_version < '3.11'
Provides-Extra: build
Requires-Dist: hatch; extra == 'build'
Provides-Extra: dev
Requires-Dist: opencv-stubs; extra == 'dev'
Requires-Dist: pip-tools; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pyright; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: term-image; extra == 'dev'
Provides-Extra: flake8
Requires-Dist: flake8; extra == 'flake8'
Requires-Dist: flake8-broken-line; extra == 'flake8'
Requires-Dist: flake8-bugbear; extra == 'flake8'
Requires-Dist: flake8-builtins; extra == 'flake8'
Requires-Dist: flake8-commas; extra == 'flake8'
Requires-Dist: flake8-comprehensions; extra == 'flake8'
Requires-Dist: flake8-docstrings; extra == 'flake8'
Requires-Dist: flake8-import-order; extra == 'flake8'
Requires-Dist: flake8-noqa; extra == 'flake8'
Requires-Dist: flake8-pyproject; extra == 'flake8'
Requires-Dist: flake8-quotes; extra == 'flake8'
Requires-Dist: pep8-naming; extra == 'flake8'
Provides-Extra: opencv
Requires-Dist: opencv-python>=4.7; extra == 'opencv'
Provides-Extra: opencv-headless
Requires-Dist: opencv-python-headless>=4.7; extra == 'opencv-headless'
Provides-Extra: terminal
Requires-Dist: pillow; extra == 'terminal'
Requires-Dist: term-image; extra == 'terminal'
Provides-Extra: test
Requires-Dist: nox; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# 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]"
```
