Skip to main content

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


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 details)

Uploaded Source

Built Distribution

pysparklines-1.4-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pysparklines-1.4.tar.gz.

File metadata

  • Download URL: pysparklines-1.4.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pysparklines-1.4.tar.gz
Algorithm Hash digest
SHA256 335c1bbc6907c39ad66365d99f9cc643086ef0d0e1e071c8a5a4016b90a3b992
MD5 8f6892578d37907721c7fc17f9d68ae0
BLAKE2b-256 76aedff18fa3e039b158388a9ba55b54331363165be3dc7cf2b2fc80fc0f73d6

See more details on using hashes here.

File details

Details for the file pysparklines-1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: pysparklines-1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pysparklines-1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2ac6885166b1828f503855bf3b745bf64637dd399a4b544543ebd73197470ff1
MD5 9fc554d270e91141584782544516e390
BLAKE2b-256 b2bb50102e55658e40c03c619be10747c851aac401ee125286c89c1e8d9d97d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page