Skip to main content

Basic progress bar and discord progress bar

Project description

Basic Progress Bar

Progress bar with no dependencies.

Pypi PyPI PyPI - Python Version


installation:

from basicprogressbar import BasicProgressBar

Arguments:

    current:float = 0       # current progress
    total:float = -1        # total progress '-1' for unlimited
    posttext:str=""         # text behind the bar
    pretext:str="Progress:" # text before the bar
    length:int=60           # length of the bar
    endtext:str=""          # text after the bar when done
    endline:str='\r'        # endline character to rewite same line

Basic Examples:

prog = BasicProgressBar(1,10,pretext="Before bar:")
for i in range(11):
    time.sleep(0.1)
    prog.current = i
    prog.endtext = (f"I ended on {i}")
    prog.bar(True)

for i in range(11):
    time.sleep(0.1)
    BasicProgressBar(i,10).bar(True)

prog = BasicProgressBar(1,10)
for i in range(11):
    time.sleep(0.1)
    prog.current = i
    prog.posttext = f"processing {i}"
    print(prog.bar(),end=prog.endline)

prog = BasicProgressBar()
for i in range(10):
    time.sleep(0.1)
    print(prog.next(),end="\r")
print()

Discord Progress Bar:

Progress bar for discord

Dependencies: requests, time

installation:

from basicprogressbar import DiscordProgressBar

Arguments:

    # All the arguments of from BasicProgressBar first
    idtoken:str=""              # discord id token
    disuser:str="Progress Bar"  # name of discord user
    throttle:float=0.5          # time between messages
    # shouldnt have to edit the ones below
    messtime:float=0.0          # time used for waiting between messages
    messid:str=""               # message id to edit line
    timeout:float=10.0          # discord timeout

Examples:

# all examples from BasicProgressBar apply
token = "23135245523/f43faDSAF-FEAfe24f3qfq-2yfbB-agdagADGA-g334t34gqarGS"

prog = DiscordProgressBar(1,100,idtoken=token)
for i in range(1,101):
    time.sleep(0.1)
    prog.current = i
    prog.send()

prog = DiscordProgressBar(idtoken=token)
for i in range(1,101):
    time.sleep(0.1)
    prog.current = i
    prog.send()

prog = DiscordProgressBar(total=100, idtoken=token)
for i in range(1,101):
    time.sleep(0.1)
    prog.next()

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

basicprogressbar-1.0.0b0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

basicprogressbar-1.0.0b0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file basicprogressbar-1.0.0b0.tar.gz.

File metadata

  • Download URL: basicprogressbar-1.0.0b0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for basicprogressbar-1.0.0b0.tar.gz
Algorithm Hash digest
SHA256 a4c35fb11a9f683782f7c176c938549dd7be0fb44a2f24571b4790b85493d2bc
MD5 a33fed766570ce0cc3d20e9cafc75c4c
BLAKE2b-256 714e87163179dc1cf82dcd6cc01459c4e07fedae6b5037d2bffa8b6199f92484

See more details on using hashes here.

File details

Details for the file basicprogressbar-1.0.0b0-py3-none-any.whl.

File metadata

File hashes

Hashes for basicprogressbar-1.0.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab2c33d8dcd0c31643c21be86483007c52fcf3c9a17760bc971f13c0eddbd7f3
MD5 c13a0b9cb76d09febce13aa12fc2970f
BLAKE2b-256 1b3d1e30ee4c1b75e0d740e2375900addbaa76e12116bd26ecd8e47f32021cd8

See more details on using hashes here.

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