yaspin
Yet Another Terminal Spinner
What it is and what it does
Yaspin is a terminal spinner library that animates a loading indicator while code executes, helping users understand that a long-running operation is still in progress. It wraps operations via context manager or function decorator, requiring minimal code changes to integrate into existing projects. The library supports 70+ spinner animations from cli-spinners, all termcolor colors and text attributes (bold, blink, etc.), and allows dynamic updates to spinner style, text, and color mid-operation. Output goes to stdout by default but can be redirected to any stream, and the library handles POSIX signals and safe pipes/redirects.
The single runtime dependency is termcolor, and the package is pure Python with low install friction. It targets Python 3.10+ and runs on CPython and PyPy. The API is designed for ease of integration—spinners can be controlled manually via start/stop or automatically via context manager, and the library provides methods like .write() to emit messages without colliding with the spinner animation.
Use it for:
- Display progress feedback during file downloads, API calls, or database queries in CLI tools.
- Wrap long-running data processing functions with a decorator to show activity without modifying the function body.
- Provide visual feedback in scripts that perform batch operations or system administration tasks.
- Integrate with prompt-toolkit or other terminal UI libraries to show background task progress.
- Log operation milestones (via .write()) while keeping the spinner animated in the foreground.
- Create custom spinner animations by defining frame sequences and intervals for domain-specific indicators.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Yaspin displays an animated terminal spinner to indicate progress during long-running operations, with support for 70+ spinner styles, colors, and text attributes via a context manager or decorator interface.
Yes, if you need a lightweight, low-friction terminal spinner for CLI tools or scripts. The library is mature (Production/Stable), has no security vulnerabilities, and integrates easily via context manager or decorator. However, maintenance is aging (251 days since last release), so consider this if you need active bug fixes or Python version support updates; for stable, fire-and-forget use cases it is reliable.
Install
yaspin on PyPI
pip
pip install yaspinuv
uv add yaspinpoetry
poetry add yaspinInstalling yaspin
Before you install
Low friction: pure Python wheel with a single runtime dependency (termcolor). Maintenance status is aging—last release was 251 days ago and the repo shows no recent activity, though it remains archived=false with 915 stars and no known vulnerabilities.
License in practice
MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install yaspin
import time
from yaspin import yaspin
with yaspin(text="Loading") as spinner:
time.sleep(2)
spinner.ok("✅")
Requires Python 3.10 or later (supports 3.10, 3.11, 3.12, 3.13, 3.14). Terminal must support ANSI escape sequences for spinner animation.
Verify before relying
- Whether aging maintenance status (251 days since last release) affects compatibility with newer Python patch versions or terminal emulators.
- Performance characteristics when used with very high-frequency spinner updates or in resource-constrained environments.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — termcolor |
| Maintenance | aging — 251 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,249,241/month — #1,947 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: yaspin-3.4.0-py3-none-any.whl
Keywords: spinner, console, terminal, loader, indicator
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
spinnersProvides an enum of more than 60 pre-defined…
permissive · top 5,000 on PyPI
haloHalo displays animated spinners in the terminal…
permissive · top 5,000 on PyPI
progressProvides terminal progress bars and spinners…
permissive · top 5,000 on PyPI
click-spinnerDisplays a simple animated spinner in the…
permissive · top 5,000 on PyPI
alive-progressDisplays an animated progress bar in the…
permissive · top 5,000 on PyPI
progressbar2progressbar2 renders text-based progress bars…
permissive · top 5,000 on PyPI
ascii-colorsUnified terminal UI library providing colored…
permissive · top 15,000 on PyPI
cursorHides or shows the terminal cursor in Python…
copyleft · top 15,000 on PyPI
enlightenEnlighten is a console progress bar library…
copyleft · top 5,000 on PyPI
pastelPastel adds colored text output to terminal…
permissive · top 5,000 on PyPI