Skip to main content

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

zobar-0.1.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zobar-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file zobar-0.1.2.tar.gz.

File metadata

  • Download URL: zobar-0.1.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for zobar-0.1.2.tar.gz
Algorithm Hash digest
SHA256 719ea9f04b818e02e16fa656ad33ea27b95d80db1e6912f938ca5b4c6d790ffd
MD5 cabca81c89194c2dbb38110439b89d11
BLAKE2b-256 a9077fa703deaf9c7755640783440f4291bc7fc54539b7deb30febe8d0796540

See more details on using hashes here.

File details

Details for the file zobar-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: zobar-0.1.2-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

Hashes for zobar-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10175ed95695661615f83c3bf26725d9ad2d8b912c3efdfa700c7947eef9b7af
MD5 f061443a2599244eda3d24e5b10d43ad
BLAKE2b-256 f4f2146ffddca4e97ffff53998aa2de5ad26d930404c7588f11777e6dcda4da9

See more details on using hashes here.

Supported by

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