{"id":3813,"library":"spinners","title":"Spinners for Terminals","description":"A Python port of the `cli-spinners` Node.js library, this package provides access to over 60 different terminal spinner definitions. Each definition includes the animation frames and the recommended interval between frames. It serves as a data source for spinner designs rather than a full-featured spinning utility. For more advanced usage, such as animating spinners with context managers or decorators, other libraries like `halo` or `yaspin` are often recommended as wrappers. The current version is 0.0.24, released in February 2020. [1, 2, 6]","status":"maintenance","version":"0.0.24","language":"en","source_language":"en","source_url":"https://github.com/manrajgrover/py-spinners","tags":["cli","spinner","spinners","terminal","term","console","ascii","unicode","loading","indicator","progress","busy","wait","idle","json"],"install":[{"cmd":"pip install spinners","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"The library exposes all spinner definitions as members of the `Spinners` Enum. Individual spinner data (frames and interval) are accessed via `Spinners.<spinner_name>.value`.","wrong":"from spinners import dots","symbol":"Spinners","correct":"from spinners import Spinners"}],"quickstart":{"code":"import time\nfrom spinners import Spinners\n\n# Get the data for a specific spinner (e.g., 'dots')\ndots_spinner_data = Spinners.dots.value\n\nprint(f\"Spinner frames for 'dots': {dots_spinner_data['frames']}\")\nprint(f\"Spinner interval for 'dots': {dots_spinner_data['interval']}ms\")\n\n# --- This library provides data; animation must be custom or via another library ---\n# Example of manually animating a spinner based on its data:\nprint(\"\\nManually animating 'dots' spinner for 2 seconds:\")\nend_time = time.time() + 2\nwhile time.time() < end_time:\n    for frame in dots_spinner_data['frames']:\n        print(f\"\\r{frame} Loading...\", end=\"\", flush=True)\n        time.sleep(dots_spinner_data['interval'] / 1000.0) # Convert ms to seconds\n\nprint(\"\\rDone!         \") # Clear the line and print Done\n","lang":"python","description":"This quickstart demonstrates how to import the `Spinners` Enum and access the raw frame sequences and intervals for a specific spinner. It then provides a basic, manual loop to illustrate how this data can be used to animate a spinner in the terminal. It's important to note that this library only provides the spinner definitions; the animation logic itself needs to be implemented by the user or by using a wrapper library."},"warnings":[{"fix":"To animate spinners, users must implement custom display logic using the `Spinners.<name>.value` data (as shown in the quickstart), or integrate with more feature-rich wrapper libraries like `halo` or `yaspin`, which offer high-level APIs for terminal spinners. [2, 8]","message":"This library primarily provides *definitions* of spinners (animation frames and intervals) as a Python port of `cli-spinners`. It *does not* include built-in functionality to directly animate or display these spinners in the terminal. Users often expect methods like `start()` or `stop()` which are not part of this package.","severity":"gotcha","affected_versions":"All versions (0.0.1 to 0.0.24)"},{"fix":"For projects requiring ongoing support, more advanced features (e.g., text, colors, context managers), and active development, consider using `halo` or `yaspin`. These libraries often build upon similar spinner data but provide a comprehensive API for terminal interaction. [1, 2, 8]","message":"The `spinners` library has not been updated since February 2020 (v0.0.24). While functional for its intended purpose of providing spinner definitions, it is not actively maintained for new features or direct animation capabilities. The GitHub README explicitly suggests using `halo` for Python as a more modern and feature-rich alternative for actual spinner animation.","severity":"gotcha","affected_versions":"All versions (0.0.1 to 0.0.24)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}