Skip to main content

Pythonic progress bar

Project description

Basic usage:

import time

from lubar import ProgressBar

total = 100
bar = ProgressBar(total)
for i in bar(range(total)):
    time.sleep(0.05)

Keyword Arguments:

  • size: size of the progress bar (default to 37)

  • description: progress description (default to '')

  • file: file object to print progress bar to it (default to sys.stdout)

  • progressed_char: progress character (default to '#')

  • remained_char: remain character (default to '.')

  • enclosing_chars: characters to enclose progress bar between them (default to ('[', ']'))

  • join_char: character to join progress bar parts (default to ' ')

Note: All attributes can be updated at run time. I designed this progress bar to train deep learning models in PyTorch. I needed a progress bar to update it description in training loops to print model's losses values.

Special credit to eusoubrasileiro. I designed this progress based on his answer in Stack Overflow

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

lubar-0.0.4.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

lubar-0.0.4-py3-none-any.whl (15.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page