Skip to main content

Just replace your tqdm bars with this.

Project description

tqdm-overflow

A tqdm progress bar that is... well, more fun.

demo

It hits 100% long before the loop is done, and then the rest of the work just pours out the end of the bar and piles up at the bottom of your terminal as sand.

Install

uv add tqdm-overflow

Use

Like tqdm, with one extra knob:

from tqdm_overflow import OverflowBar

for item in OverflowBar(range(1000), total=1000, fill_at=0.2):
    do_work(item)

fill_at is the fraction of total where the bar reads 100% (default 0.2). Everything past that overflows. You still feed it the real total and never go over it — the bar just gets there early.

There's also grains_per_unit, spawn_cap, and steps_per_frame if you want a heavier pour or faster sand.

To play with the physics or the colors, build a SandEngine or Screen and pass it in — the bar sizes them to your terminal at run time:

from tqdm_overflow import OverflowBar, SandEngine, Screen

OverflowBar(
    range(1000), total=1000, fill_at=0.2,
    engine=SandEngine(jitter=0.7, g=0.3),
    screen=Screen(palette=[(255, 80, 80), (180, 40, 40), (90, 20, 20)]),
)

Or just watch it:

tqdm-overflow
tqdm-overflow --fill-at 0.05 --delay 0.004

Needs

Python 3.10+, and a terminal that does truecolor and braille — kitty, alacritty, wezterm, iTerm2, etc. Piped or redirected, it quietly falls back to a normal tqdm. Terminal size is read once at startup.

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

tqdm_overflow-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

tqdm_overflow-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file tqdm_overflow-0.1.0.tar.gz.

File metadata

  • Download URL: tqdm_overflow-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 tqdm_overflow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9309e8b1a5ff7ea2e55b21f7cfe048ea8bbd9ef668f5fbb08939d6cebe8fb41e
MD5 6fc6c6d1cbe833bb6a12c837250984af
BLAKE2b-256 cec6c7b5f5d83ecce041e7cf1666a627ba66280965a15614481195e7d0fb3937

See more details on using hashes here.

File details

Details for the file tqdm_overflow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tqdm_overflow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 tqdm_overflow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8c11f93f8a62e1fc54e4204ce56858b0e8c900f637a83e58181bd3322c8d021
MD5 3f36e087a03e556c81e353f4e23dac01
BLAKE2b-256 095fee33ed98795ad6919c39e2e6b1227717ee0eab527ce05fef73be33ad7252

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