Package containing a few python utils functions.
Project description
hbtools
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
Release history Release notifications | RSS feed
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.3.tar.gz
(40.7 kB
view hashes)