Skip to main content

Package containing a few python utils functions.

Project description

hbtools

PyPI PyPI - Python Version PyPI - Downloads License Linting Tests

Package containing a few python utils functions.

Installation

The package is available on pypi here 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

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

Prints

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hbtools-0.4.2.tar.gz (40.6 kB view hashes)

Uploaded Source

Built Distribution

hbtools-0.4.2-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page