A little terminal spinner lib. Heavily inspired by go-spin. (This library is not the one from FLIR).
$ pip install pyspin
make a spinner by hand:
or you can use the decorator pyspin provide:
from __future__ import print_function
import time
from pyspin.spin import make_spin, Default
# Choose a spin style and the words when showing the spin.
@make_spin(Default, "Downloading...")
def download_video():
time.sleep(10)
if __name__ == '__main__':
print("I'm going to download a video, and it'll cost much time.")
download_video()
print("Done!")
You can have a look at the example code in the example folder. Run it via:
$ python example/example_spin.py
$ python example/usage_example.py
- If you find an interesting spinner, send me a pull request <3
- If you find a bug or have any suggestions, open an issue.
Contributions are always welcome at any time! ✨ 🍰 ✨
MIT.