{ "info": { "author": "Martin Chlumsky", "author_email": "martin.chlumsky@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "===============================\nTopShape\n===============================\n\n\n.. image:: https://img.shields.io/pypi/v/topshape.svg\n :target: https://pypi.python.org/pypi/topshape\n\n.. image:: https://img.shields.io/travis/mchlumsky/topshape.svg\n :target: https://travis-ci.org/mchlumsky/topshape\n\n.. image:: https://readthedocs.org/projects/topshape/badge/?version=latest\n :target: https://topshape.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/mchlumsky/topshape/shield.svg\n :target: https://pyup.io/repos/github/mchlumsky/topshape/\n :alt: Updates\n\n.. image:: https://pyup.io/repos/github/mchlumsky/topshape/python-3-shield.svg\n :target: https://pyup.io/repos/github/mchlumsky/topshape/\n :alt: Python 3\n\n.. image:: https://codecov.io/gh/mchlumsky/topshape/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/mchlumsky/topshape\n\n\nLibrary for easily creating text interfaces that look like Linux's top program.\n\nIt is built on top of urwid_ but requires no knowledge of urwid itself.\n\n.. _urwid: http://urwid.org/\n\n* Free software: MIT license\n* Documentation: https://topshape.readthedocs.io.\n* Python versions supported: 2.7, 3.3, 3.4, 3.5, 3.6\n\n**********\nQuickstart\n**********\n\nHere's an example of how to use TopShape:\n\n.. code:: python\n\n from topshape import TopShape\n\n\n # The columns are a list (or tuple) of dictionaries. Each\n # dictionary defines a column in the body\n columns = ({'label': 'header1'},\n {'label': 'header2'},\n {'label': 'header3'})\n\n\n # The body function will be passed as a callback that must\n # return a 2-dimensional array everytime it's called.\n def body():\n return [[str(i*j) for i in range(3)] for j in range(10)]\n\n\n # The header function will be passed as a callback that must\n # return a string everytime it's called.\n def header():\n return 'This is the header!'\n\n\n # The footer function will be passed as a callback that must\n # return a string everytime it's called.\n def footer():\n return 'This is the footer!'\n\n\n def handle_q(app):\n app.exit()\n\n def handle_f(app, answer):\n # do something with the answer\n # ...\n\n # key_map maps keys pressed to callbacks\n key_map = {'q': handle_q,\n 'f': (handle_f, 'Enter some text here:'}\n\n app = TopShape.create_app(columns, body, header, footer,\n key_mapping=key_map)\n app.run()\n\n\nOutput:\n\n.. image:: https://raw.githubusercontent.com/mchlumsky/topshape/master/docs/example1.png\n\nOutput (waiting for input from user):\n\n.. image:: https://raw.githubusercontent.com/mchlumsky/topshape/master/docs/example1-1.png\n\nThere is also a more complete example here_ which is a clone of the linux top program.\n\n.. _here: https://github.com/mchlumsky/topshape/blob/master/bin/toppy\n\nScreenshot:\n\n.. image:: https://raw.githubusercontent.com/mchlumsky/topshape/master/docs/example2.png\n\n\n*******\nCredits\n*******\n\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", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mchlumsky/topshape", "keywords": "topshape", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "topshape", "package_url": "https://pypi.org/project/topshape/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/topshape/", "project_urls": { "Homepage": "https://github.com/mchlumsky/topshape" }, "release_url": "https://pypi.org/project/topshape/1.0.0/", "requires_dist": [ "psutil", "urwid" ], "requires_python": "", "summary": "Library for easily creating text interfaces that look like Linux's top program.", "version": "1.0.0" }, "last_serial": 2764857, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "045961db6de1de8b84d32bd73fda205a", "sha256": "943a8a8639036ca41dc3656522fa8b36c2581fa271e0c0ec6e5a6f57a1342aa4" }, "downloads": -1, "filename": "topshape-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "045961db6de1de8b84d32bd73fda205a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9755, "upload_time": "2017-01-10T11:59:13", "url": "https://files.pythonhosted.org/packages/0e/88/b088062db7e53d13d8675898b35ba59ceb8cc3743ed68ed91de19b84837f/topshape-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8603f0bc0a30af7cfb89fd8036ccdce9", "sha256": "cb1f1b886f53ddbd1665e52e6261742f4e6abd2ea9f0cdde77dd0b7f69c1f7c2" }, "downloads": -1, "filename": "topshape-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8603f0bc0a30af7cfb89fd8036ccdce9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 96938, "upload_time": "2017-01-10T11:59:15", "url": "https://files.pythonhosted.org/packages/c0/57/ed7dfa3dfd18745dbeb7c2822fd7e2bd37a00e323d2ebd01ffabd449b9a5/topshape-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8b175f647d5b785d6572c5b52ed21fa9", "sha256": "40e82b0552ccbe6d316abad4a6271bd601541a13b67fdef48e158cd53f1873f8" }, "downloads": -1, "filename": "topshape-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b175f647d5b785d6572c5b52ed21fa9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10804, "upload_time": "2017-02-21T01:33:42", "url": "https://files.pythonhosted.org/packages/d8/f9/3fe89d2384a873c17306d07c31a4d18f96bddfdecd066c88a11468a1bc79/topshape-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec32825d91e9dd8fad47e183189d8818", "sha256": "a5cb86a1d0a4fe682688c007bfff2d1ed8475020e8ff09813edab1389cd9e3d0" }, "downloads": -1, "filename": "topshape-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ec32825d91e9dd8fad47e183189d8818", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 102130, "upload_time": "2017-02-21T01:33:43", "url": "https://files.pythonhosted.org/packages/ee/2f/44268e2e9738b721900d123f01cbf1653450ccda2ffa82fe6c4992a5734e/topshape-0.2.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9b4cf4a85a3c6adc8eb5b8d1921bf3d1", "sha256": "b771fbe21b27f05c12ec1197bc5bf8d0690fe9cd89c07f21b7a33b1386855da5" }, "downloads": -1, "filename": "topshape-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9b4cf4a85a3c6adc8eb5b8d1921bf3d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10796, "upload_time": "2017-04-10T00:15:24", "url": "https://files.pythonhosted.org/packages/9c/b0/80f3a3815b0a72f6144a4730c69738b0b8cd3d3f6a8215361adaef5a6efc/topshape-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1a5ea7f6cfa9417857e258201c1f227", "sha256": "464b0838c38e89e9c4b6962bf67fb05cf1fc819a4eac3f26b57bbf56c80c2801" }, "downloads": -1, "filename": "topshape-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f1a5ea7f6cfa9417857e258201c1f227", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 102139, "upload_time": "2017-04-10T00:15:26", "url": "https://files.pythonhosted.org/packages/11/8f/d3bd7541f7fd9014642b9ba8a7947aa717a52ff1a64615a0d35bd08eaa1e/topshape-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9b4cf4a85a3c6adc8eb5b8d1921bf3d1", "sha256": "b771fbe21b27f05c12ec1197bc5bf8d0690fe9cd89c07f21b7a33b1386855da5" }, "downloads": -1, "filename": "topshape-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9b4cf4a85a3c6adc8eb5b8d1921bf3d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10796, "upload_time": "2017-04-10T00:15:24", "url": "https://files.pythonhosted.org/packages/9c/b0/80f3a3815b0a72f6144a4730c69738b0b8cd3d3f6a8215361adaef5a6efc/topshape-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1a5ea7f6cfa9417857e258201c1f227", "sha256": "464b0838c38e89e9c4b6962bf67fb05cf1fc819a4eac3f26b57bbf56c80c2801" }, "downloads": -1, "filename": "topshape-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f1a5ea7f6cfa9417857e258201c1f227", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 102139, "upload_time": "2017-04-10T00:15:26", "url": "https://files.pythonhosted.org/packages/11/8f/d3bd7541f7fd9014642b9ba8a7947aa717a52ff1a64615a0d35bd08eaa1e/topshape-1.0.0.tar.gz" } ] }