skillfed

sparklines

Generate sparklines for numbers using Unicode characters only.

sparklines v1.0.0 4.9M downloads/30d#2,192 on PyPI129
Permissive license MIT Active released

What it is and what it does

Sparklines is a terminal visualization tool that converts sequences of numbers into compact Unicode bar charts, inspired by Edward Tufte's concept of data-dense graphics. It renders data as a single row of Unicode characters (▁▂▃▄▅▆▇█) by default, with support for multi-line output for higher resolution, automatic handling of mixed positive/negative values (split across rows), and graceful rendering of missing data as gaps.

The package works both as a command-line tool and as a Python library. It's designed for quick visual summaries in contexts where traditional charts are impractical—monitoring sensor readings in IoT networks, tracking stock prices or trading volume, displaying request rates in DevOps dashboards, or visualizing training metrics in machine learning workflows. It depends only on termcolor for color support and runs on Python 3.9 through 3.13.

Use it for:

  • Display IoT sensor readings (temperature, humidity, power) as compact inline charts in monitoring dashboards.
  • Visualize stock price history or daily P&L (gains above, losses below) in finance terminals.
  • Show request rate, error rate, or build duration trends in DevOps/SRE monitoring without opening a graphing tool.
  • Track training loss and validation accuracy per epoch in machine learning experiments inline.
  • Monitor token usage, cost per API call, or cache hit rates in agentic computing workflows.
  • Plot heart rate, sleep quality, or blood glucose trends in health and fitness tracking applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Sparklines renders compact Unicode bar charts (▃▁▄▁▅█▂▅) in your terminal or Python code to visualize sequences of numbers, supporting mixed positive/negative data and missing values.

Yes. Sparklines is production-stable, actively maintained, has zero known vulnerabilities, installs with minimal friction, and solves a specific problem well: inline terminal visualization of numeric sequences. Install it if you need quick visual feedback on time-series data in shell scripts, monitoring tools, or Python notebooks without the overhead of a graphing library.

Install

sparklines on PyPI

pip

pip install sparklines

uv

uv add sparklines

poetry

poetry add sparklines

Installing sparklines

Before you install

Installs cleanly with a single lightweight runtime dependency (termcolor). The package is actively maintained, marked Production/Stable, and has been in development since 2016 with a recent release.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal attribution requirements.

Quickstart

pip install sparklines

from sparklines import sparklines

for line in sparklines([1, 2, 3, 4, 5.0, None, 3, 2, 1]):
    print(line)
# ▁▃▅▆█ ▅▃▁

Requires Python 3.9 or later; terminal must support Unicode characters.

Verify before relying

  • Whether the package handles very large datasets efficiently or has memory/performance limits.
  • Whether color emphasis and line wrapping features are fully documented in the API.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — termcolor
Maintenance actively maintained — 67 days since the last release
Last repo commit
First released
Downloads 4,948,615/month — #2,192 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sparklines-1.0.0-py3-none-any.whl

Keywords: chart, tool, visualization

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: Other AudienceLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPy

Tags

unicode bar charts terminalsparklines command linequick data visualization shellcompact number visualizationterminal chart toolIoT sensor data displayascii sparklines
terminal-uidata-visualizationmonitoring

More Utilities packages