Skip to main content

Loading Graphical Bar Tracker

Project description

Loading Graphical Bar Tracker

Disclaimer
This is not propaganda. Any resemblance to real abbreviations or symbols is purely coincidental.

lgbt- Beautiful progress bar with rainbow colors and other ways to customize the appearance

Update news 2.3.3

  • Optimized the console output method
  • Removed some progress bar mods
  • Fixed minor errors and bugs.

Download

pip install lgbt

Usage

The standard way

from lgbt import lgbt

for i in lgbt(range(1000000)):
	pass

GIF

With update

from lgbt import lgbt

# total is necessary argument
bar = lgbt(total=1000) 
for i in range(1000):
	bar.update(1)

GIF

Advanced mode

import time
from math import cos

from lgbt import lgbt

# returns a special type for monitoring values
tracker = lgbt.tracker()
x = 0.0
dx = 0.2

for i in lgbt(range(1000), desc="Cosinus", tracker=tracker, max_value=1.0):
	# property item for change value of the current bar
	tracker.item = cos(x)
	x += dx
	# static method to move to the next bar
	lgbt.step(tracker)
	time.sleep(0.1)

GIF

Possible parameters

Without tracker

from lgbt import lgbt

lgbt(iterable, total, desc, mode, miniter, mininterval, hero)
  • iterable - An iterable object or generator.
  • total - The number of elements in the iterable, if not specified, is the length of the iterable.
  • desc - Description in front of the progress bar.
  • mode - Customizing the progress bar. To see which modes are available, use lgbt.modes(). Default ='white'.
  • miniter - Minimum number of iterations between renders. Default =2500.
  • mininterval - Minimum time between renderings. Default =0.1.
  • hero - Customization of the description string (emoji). To view all available options, use lgbt.heroes(). Default ='rainbow'

With tracker

All previous parameters work with the tracker, but new ones are also added.

from lgbt import lgbt

lgbt(..., tracker, desc_hist, fix, max_value)
  • tracker - A special type of container for a value that is displayed in the bars of a histogram.
  • desc_hist - The description line for the table caption.
  • fix - A Boolean value that controls the auto-scaling of the histogram. Default =True.
  • max_value - The maximum absolute starting value for the histogram, if fix=False can be changed. Default =0.5

About tracker

Tracker is a class with an item property that allows you to change the value of the current bar in the histogram. To move to the next bar, use lgbt.step(tracker)

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

lgbt-2.3.4.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

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

lgbt-2.3.4-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file lgbt-2.3.4.tar.gz.

File metadata

  • Download URL: lgbt-2.3.4.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lgbt-2.3.4.tar.gz
Algorithm Hash digest
SHA256 ad8ea258bb3caf9d3e5de426a118bc88f74660f6cf94048c0d07c42adc165db1
MD5 08beeb56d81b7be790847439169f7b6a
BLAKE2b-256 b8017e35b0fa8bed91576ac342f4f7973d5eddf00e8ca9298d97f9de67f4f204

See more details on using hashes here.

File details

Details for the file lgbt-2.3.4-py3-none-any.whl.

File metadata

  • Download URL: lgbt-2.3.4-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for lgbt-2.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9f57b3299f4e1fb3d7364fc08f1667eb478b3373c55f59d265020f7379af1840
MD5 00d4fd8cac7f997e31f62c1641d31ef2
BLAKE2b-256 3e319585e49aff25a99cd618cb79d3dd24d6464b954800b21f73941acb4a3e43

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