Skip to main content

A simple terminal spinner for Python

Project description

Terminal Spinner Package

A simple Python package to display a spinner in the center of the terminal screen.

Features

  • Displays a rotating spinner in the center of the terminal regardless the size of the screen.
  • Clears the screen before starting the spinner.
  • Hides the cursor while the spinner is running.
  • Restores the cursor to its original position after completion and clears the screen again.

Installation

You can install the package via pip (to be updated once the package is published to PyPI):

pip install terminal-spinner

How to use

from terminal_spinner import run_spinner

# Run the spinner for X seconds, 5 by default
run_spinner(duration=5)

Example

# example.py

from terminal_spinner import run_spinner

def main():
    print("Starting spinner...")
    run_spinner(duration=3)
    print("Spinner done!")

if __name__ == "__main__":
    main()
python example.py

License

This project is licensed under the MIT License

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

terminal_spinner-0.0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

terminal_spinner-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file terminal_spinner-0.0.1.tar.gz.

File metadata

  • Download URL: terminal_spinner-0.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for terminal_spinner-0.0.1.tar.gz
Algorithm Hash digest
SHA256 95c7a7a35560b21c5b3f941a3c9f59a55432de85f4f4ca738904b39fffce6258
MD5 82e93192a3b77185566b627421780a4c
BLAKE2b-256 eb8de2021d23972714d50d488fa127e6cfedfc629d1f53e2a51634931f0bcf1b

See more details on using hashes here.

File details

Details for the file terminal_spinner-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_spinner-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3550fc250efc3c0b09a337e9108e9b105a43fcdbff628c35c2bda1ded836243
MD5 561f1e5e9d4059fd2eecd924ce382bf4
BLAKE2b-256 092f07760e46fc6e6647785154f66ca60773fbe9cd64618a882c4cac2d70331f

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