hbutils

raw JSON →
0.14.2 verified Fri May 01 auth: no python

A Python toolkit providing lightweight utilities for infrastructure development, including TQDM-like progress bars, parallel execution, read-write locks, pretty logging, int hash functions, environment detection, and output capture. Current version 0.14.2, with monthly releases.

pip install hbutils
error ModuleNotFoundError: No module named 'hbutils.tqdm'
cause tqdm was moved to hbutils.light.tqdm in v0.14.2.
fix
Use 'from hbutils.light.tqdm import tqdm' instead.
error ImportError: cannot import name 'parallel_run' from 'hbutils'
cause parallel_run is in the submodule hbutils.parallel.
fix
Use 'from hbutils.parallel import parallel_run'.
breaking In v0.14.2, the tqdm module moved to hbutils.light.tqdm. Importing from hbutils.tqdm no longer works.
fix Change imports to 'from hbutils.light.tqdm import tqdm'.
deprecated Python 3.7 support was dropped in v0.10.0.
fix Upgrade to Python 3.8 or higher.
gotcha The capture function can cause issues if not properly terminated; ensure you use it within a context manager or handle extreme cases.

Demonstrates using the lightweight TQDM progress bar.

from hbutils.light.tqdm import tqdm
import time

for i in tqdm(range(10)):
    time.sleep(0.1)