Skip to main content

Util for generating unicode text based sparkline bargraphs from lists of numbers

Project description

About sparkblocks

sparkblocks is a Python module that provides a single function, spark() which takes a list of numbers (ints or floats) and outputs a string containing a unicode character (9601-9608) sparklines bargraph representation of the numbers.

It is based on the spark tool by Zach Holman, and the original Twitter sparkline generator by Alex Kerin.

Installation

The library can be installed from PyPi using pip:

pip install py-sparkblocks

Or cloned from Github using git:

git clone git://github.com/1stvamp/py-sparkblocks.git
cd py-sparkblocks
python setup.py install

Usage

>>> from sparkblocks import spark
>>> print(spark([1, 2, 0.2, 3.1, 2]))
▂▅▁▇▅

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

py-sparkblocks-1.0.1.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file py-sparkblocks-1.0.1.tar.gz.

File metadata

File hashes

Hashes for py-sparkblocks-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d39af9ba7f21c7a652066660a8a331979dc2ea29f01534c13b608b977e99e4bf
MD5 24ea53ae929e4324baca4cae6d77b9db
BLAKE2b-256 28f0fe100be28a6a7b728cdc3fa74f6f2a69c6d02cdabf63030e4000c8ab7ed1

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