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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file lubar-0.0.4.tar.gz.

File metadata

  • Download URL: lubar-0.0.4.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.1

File hashes

Hashes for lubar-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0680a6b89e652c973e6b76663d58133f50e266856f818e1006730e88d318d1bc
MD5 2f26e00fd8ff610bacbbe8bf9e254c82
BLAKE2b-256 978e54dbcbe7a21af794c1f4fa11277202cd233a86fcaf73eb6523381e381dcc

See more details on using hashes here.

File details

Details for the file lubar-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: lubar-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.1

File hashes

Hashes for lubar-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b258b531b50fdb5696088863b058dea860c5ed244ca698d783000063c60ddab8
MD5 58e941d07e4dd60b8e591f6008198f76
BLAKE2b-256 6186125a9a22507ad2e524376b4f5c98d6fa848a92b35767b521b662030d7faf

See more details on using hashes here.

Supported by

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