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.1.tar.gz (6.1 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.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for zobar-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c44bc62a05fba9c201a1f22c65d453d912740c514a5ccc23390ecf9ff5ec5def
MD5 1568e6483a62a47bd862b5099617e51f
BLAKE2b-256 cda4eaa992fc55bcb790358a0fa4608aee3a872e69b125af977b72cd21cef0b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zobar-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38d4bd3ebb615b5e14f7b2eab6ec513e7d8ecd2a6e061255c818b0eeba612cf1
MD5 7913e3f1f33008595c60da4325405471
BLAKE2b-256 99cedfe311eaf218e4b7c7e3b7f1c089b665f17fdfa196314061dd8b8ad07f09

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