Skip to main content

A progress bar for Python that brews beer while your code runs

Project description

🍺 brewbar

A progress bar for Python that brews beer while your code runs

No configuration | No dependencies | Just beer


🍻 Demo

from brewbar import bar
import time

for _ in bar(range(50)):
    time.sleep(0.05)

Output:

🍺🍺🍺🍺░░░░  50%  fermenting

brewbar demo

As progress increases, the beer fills and the brew stage changes:

  • mashing
  • boiling
  • fermenting
  • conditioning
  • cheers 🍻

📦 Installation

pip install brewbar

🍺 Usage

from brewbar import bar
import time

for _ in bar(range(100)):
    time.sleep(0.1)

✨ Features

  • 🍺 Beer-brewing themed progress bar
  • 🧠 Simple API (bar(iterable))
  • ⚡ Lightweight (no dependencies)
  • 🖥 Works in standard terminals
  • 🎭 Meme-friendly, screenshot-ready

What’s new in v1.2.0

ETA & Speed

ETA 00:08  |  12.5 it/s

ASCII mode (CI-safe)

bar(range(100), ascii=True)
Output:
    ##########  100%  cheers 🍻

Disable output completely

bar(range(100), disable=True)

Log to stderr

bar(range(100), file=sys.stderr)

Manual update mode

For non-iterable workflows:

from brewbar import BrewBar
import time

with BrewBar(total=10, elapsed=True, rate=True) as b:
    for _ in range(10):
        time.sleep(0.2)
        b.update()

Unknown total = spinner mode

for _ in bar(iter(int, 1)):
    time.sleep(0.05)
Displays:
    ⠙ brewing...

Nested progress bars

for _ in bar(range(3), elapsed=True):
    for _ in bar(range(10), rate=True):
        ...

Beer-color mode

bar(range(50), color=True)

🛠 Requirements

  • Python 3.8+

❓ Why brewbar?

Because sometimes you don't want:

  • ❌ giant APIs
  • ❌ heavy deps
  • ❌ walls of logs

You just want to know when your code is done…
and have a beer while waiting. 🍻

Example with timing options

from brewbar import bar
import time

for _ in bar(
    range(200),
    eta=True,
    elapsed=True,
    rate=True,
    ascii=True,
):
    time.sleep(0.05)

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

brewbar-1.2.0.tar.gz (348.1 kB view details)

Uploaded Source

Built Distribution

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

brewbar-1.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file brewbar-1.2.0.tar.gz.

File metadata

  • Download URL: brewbar-1.2.0.tar.gz
  • Upload date:
  • Size: 348.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for brewbar-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c534e077ec79cb85fd411dd30d4b70b575fde559a30f4fe5be9d340f58053dee
MD5 6b4512c18ec55b4bd1757c91e4b7db66
BLAKE2b-256 a0722ceb497157c3af77ee093a0e3633fc1b44c494427a63d10a798241ba2c3a

See more details on using hashes here.

File details

Details for the file brewbar-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: brewbar-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for brewbar-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f159420b544948ca8df43ade3ffb6c3c0563edb786c321e0131e97f1501156d
MD5 7f7ef464f7a55b6a25ea16cb4c5fc712
BLAKE2b-256 920ad276a1ae217b283bccd76e6e60eef7cd60266d1e27c328e247eef1c119d9

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