Skip to main content

A tqdm-style progress bar that plays nice with log files, terminal, and notebooks, even with multiple progress bars, threads, or processes running simultaneously.

Project description

progress-bar-plus

progress-bar-plus is a lightweight, tqdm-style progress bar. pbar provides stable time estimates, clean output when redirected to a logfile, and smooth multi-bar rendering in terminals.

I made it to deal with a few classes of edge-case situations where tqdm didn't meeting my needs. Namely: nested loops, redirected stdout, heterogeneous execution contexts, and iterators with variable speed. It shines in multi-node and multi-process pipelines with more than one iterator running at once, Especially when parts of the pipeline may restart or resume from cache and skip a bunch of items or stop early. It is intended to be indistinguishable from tqdm in normal usage, but development remains to reach that point.

Features

  • Automatic detection of execution environment (terminal, notebook, redirected logs, batch nodes)
  • Clean rendering in Jupyter
  • Multiple progress bars updating simultaneously in a single terminal without flicker or overlap.
  • Informative default labels based on the calling script, function, and line number
    • When applicable: also includes information about SLURM job and node by default
  • Stable ETA estimates even when iteration speed changes significantly
  • Near-drop-in replacement for tqdm

Contributing

Pull requests, issues, and collaborators welcome!

Installation

pip install progress-bar-plus

Requires Python 3.8 or newer.

Basic Usage

from progress_bar_plus import pbar
import time

for i in pbar(range(3)):
  for j in pbar(range(200)):
    time.sleep(0.0001 * j)

Manual Usage

from progress_bar_plus import ProgressBar
import time

p = ProgressBar(total=100, desc="Training")
for _ in range(100):
  p.update()
  time.sleep(0.01)
p.close()

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

progress_bar_plus-0.2.1a0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

progress_bar_plus-0.2.1a0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file progress_bar_plus-0.2.1a0.tar.gz.

File metadata

  • Download URL: progress_bar_plus-0.2.1a0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for progress_bar_plus-0.2.1a0.tar.gz
Algorithm Hash digest
SHA256 2a452ad39c872eacadc7ee3702c501d43aa137c79335871bc1a236203ce34e96
MD5 6c4d96aae363684021a28fb4d3d12568
BLAKE2b-256 12e635bfb782402c4f41bfb7c9f7c8018141c26210e867f005b1d1a2a7fac048

See more details on using hashes here.

File details

Details for the file progress_bar_plus-0.2.1a0-py3-none-any.whl.

File metadata

  • Download URL: progress_bar_plus-0.2.1a0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for progress_bar_plus-0.2.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 6630950febeb263b52dbdcc4615ca7ef17c7b06c5593fcd2bab17177087bed42
MD5 118669f3e4e154440a2c126b291fd3e7
BLAKE2b-256 27f6df5ec5b7aa55cdae07bc96b596d157c3d0159f4c986bf9d47cf498e4f2bf

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