Skip to main content

timeloading

Animated loading bar. This package is a loading bar that appears when a specific function is run an animation and text. This bar is stoped to run after the function has finished working. You can control the shape and the waiting message, even the animation and its colors.

Python package

Languages:

* python3

Supported Distributions:

Distribution Version Check Python Test Version Supported Status Everything works
Ubuntu 20.04.3 3.6, 3.7, 3.8, 3.9 Yes Working Yes
Windwos 11.6.4 3.6, 3.7, 3.8, 3.9 Yes Working Yes
MacOS 10.0.20348 3.6, 3.7, 3.8, 3.9 Yes Working Yes

Installation:

pip install timeloading

Usage:

from timeloading import *

# Default usage:
exec(timeloading().loading(function))

# In-depth use:
exec(timeloading(animation,time_w).loading(function,args,msg,done))

"""
Help:
# animation : ascii animation text list. ex: ["⢿","⣻","⣽","⣾","⣷","⣯","⣟","⡿"] OR "⢿⣻⣽⣾⣷⣯⣟⡿"
# time_w : Transition time between animations.
# function : The function name must be a string.
# args : Function variables. ex: (var_name,) OR [var_name]
# msg : Waiting message text.
# done : Message after completion.
"""

Examples:

from timeloading import *

# func1:
def func1():
    time.sleep(3)

# func2:
def func2(x):
    time.sleep(x)

# example-1:
# Run the wait function "func1" for 3 seconds with default settings.
exec(timeloading().loading(function="func1"))

# example-2:
# Run the wait function "func2" for 5 seconds and change the message settings.
exec(timeloading().loading(function="func2",args=[5],msg="Loading....",done="ok"))

# example-3:
# The same as the previous example, but with a change in the speed and shape of the animation.
exec(timeloading(animation=["[*  ]","[ * ]","[  *]","[ * ]",],time_w=0.1).loading(function="func2",args=[5],msg="Loading....",done="ok"))

# example-4:
# Example with color
from hexor import * # pip install hexor

p2=hexor(True,"hex")
s0=p2.c("*","#ff0000")
s1=p2.c("*","#760e0e")
s2=p2.c("*","#ff7272")

l=[f"[{s0}{s1}{s2}]",f"[{s1}{s2}{s0}]",f"[{s2}{s0}{s1}]"]
exec(timeloading(animation=l,time_w=0.1).loading(function="func2",args=[5],msg="Loading....",done="ok"))

Screenshot:

Changelog History:

## 0.0.1 [13-03-2022]
- First public release.

Metadata

Release files for timeloading 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timeloading 0.0.1
File Size Uploaded
timeloading-0.0.1.tar.gz 4.1 kB Details

Release files / timeloading-0.0.1.tar.gz

Download URL timeloading-0.0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d11afc4bced4b8b6084fe45b0e7ee979a8adbb858f2e80a7f2621712a009cd5
BLAKE2b-256 checksum
How to use checksums
07bc389e069756fae0c43050a6fa8c499521b8111b0b3b9d0b30eac542a38d74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.57.0 importlib-metadata/4.6.4 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page