--- id: sparklines version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # sparklines — Generate sparklines for numbers using Unicode characters only. License: permissive · Maintenance: active · Downloads: 4.9M/mo ## 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 above — 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 pip install sparklines uv add sparklines 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_current - Install friction: low - Maintenance: active - Downloads: 4.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags unicode bar charts terminal, sparklines command line, quick data visualization shell, compact number visualization, terminal chart tool, IoT sensor data display, ascii sparklines, terminal-ui, data-visualization, monitoring [View on SkillFed](https://skillfed.io/packages/sparklines) · [View on PyPI](https://pypi.org/project/sparklines/)