{ "info": { "author": "Vishnu P Sreenivasan", "author_email": "psvishnu.91@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7" ], "description": "[![Documentation Status](https://readthedocs.org/projects/local-visualizer/badge/?version=latest)](http://local-visualizer.readthedocs.io/en/latest/?badge=latest)\n[![Build Status](https://travis-ci.org/psvishnu91/local_visualizer.svg?branch=master)](https://travis-ci.org/psvishnu91/local_visualizer)\n[![PyPI version](https://badge.fury.io/py/local-visualizer.svg)](https://badge.fury.io/py/local-visualizer)\n\n## LocalVisualizer\n\nSimple python api to visualize the plots in a script.\n\n* Free software: MIT license\n* Documentation: https://local-visualizer.readthedocs.io\n* PyPI: https://pypi.python.org/pypi/local-visualizer/\n\n### Installation\n``` bash\npip install local-visualizer\n```\n\n### Motivation\n* When moving from an IPython notebook to a script, we lose the diagnostics\n of visualizing pandas as tables and matplotlib plots.\n* :class:`LocalViz` starts a local http server and creates a html file to\n which pandas tables and matplotlib plots can be sent over.\n* The html file is dynamically updated for long running scripts.\n\n### Usage\n``` python\nimport logging, sys, numpy as np, pandas as pd, matplotlib.pyplot as plt\nimport local_visualizer\n\nplt.style.use('fivethirtyeight')\nlogging.basicConfig(stream=sys.stdout, level=logging.DEBUG)\n\n# Create the local visualizer instance\nlviz = local_visualizer.LocalViz(html_file='lviz_test.html', port=9112)\n# INFO:root:Starting background server at: http://localhost:9112/.\n# INFO:local_visualizer:Click: http://carpediem:9112/lviz_test.html or http://localhost:9112/lviz_test.html\n\n# Create plots which will be streamed to the html file.\nlviz.h3('Matplotlib :o')\nlviz.p(\n 'Wrap your plots in the figure context manager which takes '\n 'in the kwargs of plt.figure and returns a plt.figure object.',\n)\n\nwith lviz.figure(figsize=(10, 8)) as fig:\n x = np.linspace(-10, 10, 1000)\n plt.plot(x, np.sin(x))\n plt.title('Sine test')\n\nlviz.hr()\n\n# Visualize pandas dataframes as tables.\nlviz.h3('Pandas dataframes')\n\ndf = pd.DataFrame({'A': np.linspace(1, 10, 10)})\ndf = pd.concat(\n [df, pd.DataFrame(np.random.randn(10, 4), columns=list('BCDE'))],\n axis=1,\n)\nlviz.write(df)\nlviz.close()\n```\n\n### Output\nThis starts a HTTPServer and creates a html file which is dynamically updated\neach time ``lviz`` is called.\n\n![Output image]( https://i.imgur.com/jjwvAX2.png \"The output of the above commands\")\n\n### Support and Requirements\nPython 2.7\n\n### API methods\n1. `p`: paragraph\n2. `br`: line break\n3. `hr`: Horizontal rule with line breaks\n4. `h1`, `h2`, ..., `h6`: Headers\n5. `write`: Directly write text to the html document (or pass in a `pandas.DataFrame`)\n6. `figure`: Context manager which accepts the kwargs of `plt.figure` and returns a `plt.figure` object\n7. `start`: Applicable if `LocalViz` was initialized with `lazy=True`. Starts the server and creates the html file\n8. `close`: Completes the html file\n9. `del_html`: Deletes the html file\n\n### Credits\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.2.0 (2017-11-06)\n------------------\n\nThe close method no more deletes the html but only makes the html valid.\n\n0.1.0 (2017-11-05)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/psvishnu91/local_visualizer", "keywords": "local_visualizer", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "local-visualizer", "package_url": "https://pypi.org/project/local-visualizer/", "platform": "", "project_url": "https://pypi.org/project/local-visualizer/", "project_urls": { "Homepage": "https://github.com/psvishnu91/local_visualizer" }, "release_url": "https://pypi.org/project/local-visualizer/0.2.0/", "requires_dist": [ "matplotlib" ], "requires_python": "", "summary": "Simple python api to visualize the plots in a script.", "version": "0.2.0" }, "last_serial": 3308841, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f0f959032b5c6dd6cfd131f5feef03c8", "sha256": "6a94cee57c95a9ac752f94f1404134a0b5baf98a3080fd9b02a2ac2bc92ed847" }, "downloads": -1, "filename": "local_visualizer-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0f959032b5c6dd6cfd131f5feef03c8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8364, "upload_time": "2017-11-06T04:32:14", "url": "https://files.pythonhosted.org/packages/46/75/8a34a251c1ed0cca9ae4a0060475d836df855ddf180daa370ba16167546c/local_visualizer-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8b4fa6d84e6d5968a8e43a10da8b0c8", "sha256": "194ac6c7e3a5c6c02a6444a2fbe565262917ba149368b8406d9808531a42937c" }, "downloads": -1, "filename": "local_visualizer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f8b4fa6d84e6d5968a8e43a10da8b0c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11061, "upload_time": "2017-11-06T04:32:15", "url": "https://files.pythonhosted.org/packages/b8/9e/4330a41558428ced92210f86fe649f6661501c086bb10aa50d0888d41638/local_visualizer-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c4d7b191cc9093bf955c0d6581f14d9f", "sha256": "c5868a679743a32741599764b2a58cef68d4c3d300c860b574254b78346b7b13" }, "downloads": -1, "filename": "local_visualizer-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c4d7b191cc9093bf955c0d6581f14d9f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8612, "upload_time": "2017-11-06T05:10:02", "url": "https://files.pythonhosted.org/packages/02/f3/fdf50241cd2eaa27c5ff70919ab46c83ddcf98e3dffdcedb8e353c442740/local_visualizer-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77805de4a58e76257246c1314f8f731b", "sha256": "b02410942ce406ca132d0638180fe4857e4f8427e68f031b72872fc65368ac9c" }, "downloads": -1, "filename": "local_visualizer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "77805de4a58e76257246c1314f8f731b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11675, "upload_time": "2017-11-06T05:10:04", "url": "https://files.pythonhosted.org/packages/bf/56/e7afcf873aacd4097849b617ecd14ea4ef9f0a1d3724a3158a9b7cf6bb38/local_visualizer-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f0f966905cd343a004c3ccbb5519c198", "sha256": "50e41acd02c0aa3eec904baee4f727059c483bf404ea39a2f7733daccfc76506" }, "downloads": -1, "filename": "local_visualizer-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f0f966905cd343a004c3ccbb5519c198", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8675, "upload_time": "2017-11-06T07:17:47", "url": "https://files.pythonhosted.org/packages/e0/e9/badd762ec366351cefb79a93181fe5d9a2d439cdb52227aaab4e9d9eec27/local_visualizer-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f3a64f4797796c62989075d60cf997b", "sha256": "4ce5f15e4fb71a75889ae04956ec40fb73507cdcf70f6951bab13e828e0146da" }, "downloads": -1, "filename": "local_visualizer-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0f3a64f4797796c62989075d60cf997b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11677, "upload_time": "2017-11-06T07:17:48", "url": "https://files.pythonhosted.org/packages/2a/43/258d5ec71c82b5d62bcfe9958bf739e52d80682cbd8c4a3d5c3a204b00a7/local_visualizer-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c6a98a089e383736d4009c8e295dc126", "sha256": "b7d49b6040ed710a57d947e93c92356802d22456aa92c3d5468d597b9f509536" }, "downloads": -1, "filename": "local_visualizer-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6a98a089e383736d4009c8e295dc126", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9643, "upload_time": "2017-11-06T09:08:15", "url": "https://files.pythonhosted.org/packages/2c/53/ee6d22ed18ed7f2deccbb0bc3595dc260ab023196063db399b7d5b7f6001/local_visualizer-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e68a790c70de8b231e881ace89d51aa6", "sha256": "4b68a4c7ff392835c3cd87c2100fc31a91861ab0f5263668d2988d8d13863937" }, "downloads": -1, "filename": "local_visualizer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e68a790c70de8b231e881ace89d51aa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12591, "upload_time": "2017-11-06T09:08:16", "url": "https://files.pythonhosted.org/packages/b6/e5/0df09c3732f5f02a045eb818a6071b1f4e5f7afb196819c1fef21fbc95ff/local_visualizer-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6a98a089e383736d4009c8e295dc126", "sha256": "b7d49b6040ed710a57d947e93c92356802d22456aa92c3d5468d597b9f509536" }, "downloads": -1, "filename": "local_visualizer-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c6a98a089e383736d4009c8e295dc126", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9643, "upload_time": "2017-11-06T09:08:15", "url": "https://files.pythonhosted.org/packages/2c/53/ee6d22ed18ed7f2deccbb0bc3595dc260ab023196063db399b7d5b7f6001/local_visualizer-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e68a790c70de8b231e881ace89d51aa6", "sha256": "4b68a4c7ff392835c3cd87c2100fc31a91861ab0f5263668d2988d8d13863937" }, "downloads": -1, "filename": "local_visualizer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e68a790c70de8b231e881ace89d51aa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12591, "upload_time": "2017-11-06T09:08:16", "url": "https://files.pythonhosted.org/packages/b6/e5/0df09c3732f5f02a045eb818a6071b1f4e5f7afb196819c1fef21fbc95ff/local_visualizer-0.2.0.tar.gz" } ] }