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.1

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.1.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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brewbar-1.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 326517e772abcb4652eb53be4ba7f015185138c79e52d131c684c483a51d81e8
MD5 8f94a4e39ee27afc3f4af49a9a613b57
BLAKE2b-256 555b10dc71443e69e775a2928067f8c251e558c233885ae28c590bb476a4f2a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brewbar-1.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d9326b63dc1c3c07e647642084a2892d57c6c6493407eabd7ea5a235809e8fc
MD5 476819f18cb5281aab228f04e42c2cfa
BLAKE2b-256 a009b8e5fd53bbad5bba7fb8e6b8776cf816ce30b66c7e2793f5bfe8cbb892b9

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