{ "info": { "author": "Pierre-Francois Carpentier", "author_email": "carpentier.pf@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython" ], "description": "py-ascii-graph\n==============\n\nA simple python lib to print data as ascii histograms\n\n.. image:: https://secure.travis-ci.org/kakwa/py-ascii-graph.png?branch=master\n :target: http://travis-ci.org/kakwa/py-ascii-graph\n :alt: Travis CI\n \n.. image:: https://img.shields.io/pypi/v/ascii_graph.svg\n :target: https://pypi.python.org/pypi/ascii_graph\n :alt: PyPI version\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/kakwa/py-ascii-graph\n :target: https://gitter.im/kakwa/py-ascii-graph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. image:: https://coveralls.io/repos/kakwa/py-ascii-graph/badge.svg?branch=master \n :target: https://coveralls.io/r/kakwa/py-ascii-graph?branch=master\n\n.. image:: https://readthedocs.org/projects/py-ascii-graph/badge/?version=latest\n :target: http://py-ascii-graph.readthedocs.org/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. .. image:: https://img.shields.io/pypi/pyversions/ascii_graph.svg\n.. :target: https://pypi.python.org/pypi/ascii_graph\n.. :alt: Supported Python Versions\n\n----\n\n:Git: `Github `_\n:PyPI: `Package `_\n:Doc: `Documentation `_\n:License: MIT\n:Author: Pierre-Francois Carpentier - copyright 2014\n\n----\n\nLicense\n=======\n\npy-ascii-graph is released under the MIT License.\n\nDescription\n===========\n\npy-ascii-graph is a simple python library to build ascii histograms. \nJust give it a label and a list of tuples (description, value) \nand it will automaticaly creates a nice histogram, \nwith all the stuff aligned and fitting in a fixed width line (if possible).\n\npy-ascii-graph although comes with a command line utility.\n\nExamples\n========\n\nLibrary\n-------\n\nSimple example:\n\n.. sourcecode:: python\n\n from ascii_graph import Pyasciigraph\n\n test = [('long_label', 423), ('sl', 1234), ('line3', 531), \n ('line4', 200), ('line5', 834)]\n\n graph = Pyasciigraph()\n for line in graph.graph('test print', test):\n print(line)\n\nResult:\n\n.. sourcecode:: bash\n\n test print\n ###############################################################################\n \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 423 long_label\n \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 1234 sl \n \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 531 line3 \n \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 200 line4 \n \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 834 line5\n\nComplex examples (colors, different spacing, no label...):\n\n.. sourcecode:: python\n\n from ascii_graph import Pyasciigraph\n from ascii_graph.colors import *\n from ascii_graph.colordata import vcolor\n from ascii_graph.colordata import hcolor\n \n test = [('long_label', 423), ('sl', 1234), ('line3', 531),\n ('line4', 200), ('line5', 834)]\n \n # One color per line\n print('Color example:')\n pattern = [Gre, Yel, Red]\n data = vcolor(test, pattern)\n \n graph = Pyasciigraph()\n for line in graph.graph('vcolor test', data):\n print(line)\n \n # Multicolor on one line\n print('\\nMultiColor example:')\n \n # Color lines according to Thresholds\n thresholds = {\n 51: Gre, 100: Blu, 350: Yel, 500: Red,\n }\n data = hcolor(test, thresholds)\n \n # graph with colors, power of 1000, different graph symbol,\n # float formatting and a few tweaks\n graph = Pyasciigraph(\n line_length=120,\n min_graph_length=50,\n separator_length=4,\n multivalue=False,\n human_readable='si',\n graphsymbol='*',\n float_format='{0:,.2f}',\n force_max_value=2000,\n )\n \n for line in graph.graph(label=None, data=data):\n print(line)\n\nCommand Line Utility\n--------------------\n\ncommand line:\n\n.. sourcecode:: bash\n\n $ asciigraph -h\n Usage: asciigraph [-l