Zero-dependency, high-performance progress bar for HPC and workstations
Project description
zobar
Zero Overhead Bar
A zero-dependency, high-performance, hygienically correct progress bar for Python. Designed for HPC environments, workstations, and anywhere you need a progress bar that just works without breaking your terminal logs.
Features
- Zero Dependencies: strictly standard library (
sys,time,os,re). - Terminal Hygiene:
- Single ownership of stdout (logs go to stderr).
- Clears lines properly before redrawing.
- Clean exit with newline.
- Robust:
- ANSI-aware width calculation (doesn't break on colored text).
- Graceful degradation on non-TTY environments (e.g., piped output, CI/CD logs).
- Customizable: Supports various styles (classic, gradient, braille, etc.) and colors.
Installation
pip install zobar
Usage
Basic Usage
The simplest way to use it is with the progress_bar wrapper:
import time
from zobar import progress_bar
items = range(100)
for item in progress_bar(items, desc="Processing"):
time.sleep(0.05)
Manual Control
For more control, use the AnimatedProgressBar context manager:
import time
from zobar import AnimatedProgressBar
total_steps = 50
with AnimatedProgressBar(total=total_steps, desc="Downloading", bar_style='braille', color='green') as pbar:
for i in range(total_steps):
time.sleep(0.1)
pbar.update(1)
if i % 10 == 0:
pbar.set_suffix(f"Current file: {i}")
Styles
Available styles: classic, gradient, braille, circles, blocks.
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zobar-0.1.0.tar.gz.
File metadata
- Download URL: zobar-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e08c68238469d2ac95161d197f309dea92f6499e48543872dbfc79c18f7c3f
|
|
| MD5 |
edd0187722a39ed18050d85d7e53a81c
|
|
| BLAKE2b-256 |
088d176192dff138593f561415e00906b80c2289d1b5ff938ec7c03a125fe2f7
|
File details
Details for the file zobar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zobar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
838ad9a16fb738a19edbf0d0b1caa6c48f876c9b89edd4807ca759ced1fb6ecb
|
|
| MD5 |
dffa09ef11bb9964384055091d11c62f
|
|
| BLAKE2b-256 |
b546b06870cd98e4967068141355d5b00873c3f071aba9b84725b64a712af254
|