pysparklines is a unicode sparkline generation library.
Project description
pysparkline
Python 3 clone of Zach Holman's BASH sparkline project
Takes series data via stdin, command line, or API and prints a sparkline representation.
Usage:
- $
sparkline 4 3 2 1
█▆▃▁
- $
echo "1.0 1.0 2.0 3.0 5.0 8.0 13.0" | sparkline
▁▁▂▂▃▅█
- $
seq 20 | sort -R | sparkline -r2
▃▁ █▂ ▂▆▅ ▄▇▆
██▃██▅▇▄▁███▃▇███▂█▆
- $
python3 -c "import sparkline; print(sparkline.sparkify([1.0, 2.0, 3.0, 4.0]))"
▁▃▆█
- $
python3 -c "import math, sparkline; print(sparkline.sparkify([math.cos(n/10.0) for n in range(-50, 50, 2)], rows=4))"
▁▃▅▇███▇▅▃▁
▅▂ ▃▆███████████▆▃ ▂
██▇▄▁ ▂▅█████████████████▅▂ ▁▄▇█
█████▆▄▃▁▁▁▂▃▅▇█████████████████████▇▅▃▂▁▁▁▃▄▆████
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysparklines-1.4.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for pysparklines-1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac6885166b1828f503855bf3b745bf64637dd399a4b544543ebd73197470ff1 |
|
MD5 | 9fc554d270e91141584782544516e390 |
|
BLAKE2b-256 | b2bb50102e55658e40c03c619be10747c851aac401ee125286c89c1e8d9d97d7 |