a CLI based loading spinner.
Project description
loadspinner
A CLI based loading spinner.
Prerequisites
- Terminal that accepts ANSI codes
Usage
Creating a spinner:
import loadspinner
spinner = loadspinner.Spinner(spinner_type="classic")
Starting the spinner:
spinner.start() # starts the spinner
spinner.stop() # stops the spinner
[!HINT] You can also assign a timer to spinners, e.g.
spinner.start(5)
will stop the spinner after 5 seconds.
Usage with context managers:
import loadspinner
with loadspinner.Spinner("newton"):
input("press enter to stop ")
Usage with decorators:
from loadspinner import functionSpinner
@functionSpinner("building")
def doWork():
# code...
doWork()
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
loadspinner-0.4.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for loadspinner-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec9c0d3e12056496107ca1ac6dc569963c89397e867d690e2968ad356221563 |
|
MD5 | 51ca8100879e78825893c9a3ada15026 |
|
BLAKE2b-256 | 0071b8748d9eceefc0265fb432de9e830bde6acae46fbe5bde87aa8889a4a926 |