{ "info": { "author": "Ocado Technology", "author_email": "code@ocado.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=================================\njsh - a Junos-style CLI library\n=================================\n\n.. image:: https://img.shields.io/travis/ocadotechnology/jsh.svg\n :target: https://travis-ci.org/ocadotechnology/jsh\n :alt: Build Status\n.. image:: https://landscape.io/github/ocadotechnology/jsh/master/landscape.svg\n :target: https://landscape.io/github/ocadotechnology/jsh/master\n :alt: Code Health Badge\n.. image:: https://readthedocs.org/projects/jsh/badge/?version=latest\n :target: http://jsh.readthedocs.org/en/latest/\n :alt: Documentation Status\n.. image:: https://img.shields.io/pypi/v/jsh.svg\n :target: https://pypi.python.org/pypi/jsh/\n :alt: Version Badge\n.. image:: https://img.shields.io/pypi/l/jsh.svg\n :target: https://pypi.python.org/pypi/jsh/\n :alt: License Badge\n\n**JSH** is a Junos-inspired CLI library for your Python apps.\nIf you've ever logged into a Junos_ device, you'll know how good the CLI is.\nIt offers:\n\n- tab-completion, including completion of names of items in the config\n- help by pressing \"?\" at any point\n- completion on pressing either space, tab or enter\n\nJSH attempts to reproduce some of these features (and others) in a Python library\nbased on Readline, to allow you to build better quality CLIs for your apps.\n\nDocumentation\n=============\n\nFull documentation can be found at RTD_.\n\nInstallation\n============\n\nInstall from PyPI using ``pip install jsh``.\n\nBasic Usage\n===========\n\nThe library takes a CLI \"layout\", which is a dictionary-based tree structure\ndescribing your CLI commands. For example, a completely useless CLI with\njust an ``exit`` command, you would define it like this:\n\n.. code-block:: python\n\n import jsh\n\n layout = {\n 'exit': jsh.exit,\n }\n\n jsh.run(layout)\n\n``jsh.run`` is a shortcut for the following:\n\n.. code-block:: python\n\n cli = jsh.JSH(layout)\n\n while True:\n try:\n cli.read_and_execute()\n except jsh.JSHError as err:\n print err\n except EOFError:\n break\n\nThis creates a basic layout with a single available command (``exit``), passes\nit to an instance ``jsh.JSH``, and starts an infinite loop, using the ``read_and_execute``\nmethod of the ``JSH`` CLI object to interact with the user. For more control\nover this loop, you should write your own instead of using ``jsh.run``.\n\nThis provides a CLI that looks like the following:\n\n::\n\n > ?\n Possible completions:\n exit\n > ex?\n Possible completions:\n exit\n > exit ?\n Possible completions:\n <[Enter]> Execute this command\n > exit\n\n.. _Junos: http://www.juniper.net/us/en/products-services/nos/junos/\n.. _RTD: http://jsh.readthedocs.org/en/latest/", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ocadotechnology/jsh/", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "jsh", "package_url": "https://pypi.org/project/jsh/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/jsh/", "project_urls": { "Homepage": "https://github.com/ocadotechnology/jsh/" }, "release_url": "https://pypi.org/project/jsh/0.3.6/", "requires_dist": null, "requires_python": null, "summary": "Junos-like shell library for Python", "version": "0.3.6" }, "last_serial": 1683897, "releases": { "0.3.2": [ { "comment_text": "", "digests": { "md5": "0afdeaf0f52f52fd92efe33dbbd2ea73", "sha256": "a4371cc15af0d26b14d767c72525ee1877706f99dccd9154e7cb961bc47bf1df" }, "downloads": -1, "filename": "jsh-0.3.2-py2-none-any.whl", "has_sig": false, "md5_digest": "0afdeaf0f52f52fd92efe33dbbd2ea73", "packagetype": "bdist_wheel", "python_version": "2.6", "requires_python": null, "size": 5551, "upload_time": "2015-06-30T10:38:40", "url": "https://files.pythonhosted.org/packages/e2/26/e563f25b52b952e665b841b5ca5f86a7826d1eb2b3b6ae7bcf1cc6dbef04/jsh-0.3.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e16bf618689e3ecf03d994f4b49149b", "sha256": "28eb4e5eed260ec5ea659993eb152a25409dae76039dcede6f0b8f6e7cbcd46a" }, "downloads": -1, "filename": "jsh-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "7e16bf618689e3ecf03d994f4b49149b", "packagetype": "bdist_wheel", "python_version": "3.2", "requires_python": null, "size": 5552, "upload_time": "2015-06-30T10:38:42", "url": "https://files.pythonhosted.org/packages/af/6d/db36034a79edee92fcc1067e4082d5e2a8dc5651f9aa5e13b2dd29a13501/jsh-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9b1512e7e5bcdaf1b624a115711d426c", "sha256": "ae3847e02db35aa7ec581a9f8cc674256c28ca9b16d3ac2b1135c65ef676e079" }, "downloads": -1, "filename": "jsh-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9b1512e7e5bcdaf1b624a115711d426c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8098, "upload_time": "2015-06-30T10:38:43", "url": "https://files.pythonhosted.org/packages/cb/ce/f2472ef78d85a8b39b475585d085e4f2ae8d3ea54c1d459e3743f363f5c6/jsh-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "c1df9aa1e2fa16bc53e2ec53b598e7a7", "sha256": "fcd376ccfd848f9d498e23f1c729ebd727dba518521b58d17f77e5ecb9abf1bd" }, "downloads": -1, "filename": "jsh-0.3.3-py2-none-any.whl", "has_sig": false, "md5_digest": "c1df9aa1e2fa16bc53e2ec53b598e7a7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7366, "upload_time": "2015-06-30T12:35:47", "url": "https://files.pythonhosted.org/packages/b0/53/964c39a72c9eab3daaa96c157abf70e872aa453fc18642579e94305dc8a9/jsh-0.3.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e2be957357ccf8ef79a7980fd4755b4", "sha256": "be2ab15d8d689feb2e8a385a7fa4a84506e23ba06d2d4ae5e09901b6a8d274e8" }, "downloads": -1, "filename": "jsh-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "4e2be957357ccf8ef79a7980fd4755b4", "packagetype": "bdist_wheel", "python_version": "3.2", "requires_python": null, "size": 7365, "upload_time": "2015-06-30T12:35:49", "url": "https://files.pythonhosted.org/packages/97/c4/1f4a0d9d64f62893b5a98423696f57b0aec3249600663300eeab71aede3d/jsh-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7091601f549c7375cffee86c854cf09a", "sha256": "7e5f2cafac521c24f7b912043b1d80d476ab42e0ef9bc28385dece4018067f04" }, "downloads": -1, "filename": "jsh-0.3.3.tar.gz", "has_sig": false, "md5_digest": "7091601f549c7375cffee86c854cf09a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5442, "upload_time": "2015-06-30T12:35:50", "url": "https://files.pythonhosted.org/packages/7d/83/f4bb1311204aa097f33b44e4d366351eb351e4a57234346678f2363d43b2/jsh-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "e3ab85941b9eea7241e42be9912b1fb9", "sha256": "b1305a4a48840fd94c6f35426a010ef17cbe63ccdcc18970606cccc9e508a4bc" }, "downloads": -1, "filename": "jsh-0.3.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e3ab85941b9eea7241e42be9912b1fb9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7887, "upload_time": "2015-06-30T13:59:08", "url": "https://files.pythonhosted.org/packages/0d/73/094435cd90cd3539ee0ab4ef561db4f78f7f0d6752d11eb39e1e41facf72/jsh-0.3.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ca8cf402490e9c6b361db14411c7f9c", "sha256": "fae1b1c97f7bbcf35b2b68538d4d47f40bd7ae1d378a920e4e759a51d22167e4" }, "downloads": -1, "filename": "jsh-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "7ca8cf402490e9c6b361db14411c7f9c", "packagetype": "bdist_wheel", "python_version": "3.2", "requires_python": null, "size": 7890, "upload_time": "2015-06-30T13:59:16", "url": "https://files.pythonhosted.org/packages/82/5c/e73980ec35aac53a00da42f39a183e54ec90fbade59a1f2ad2b56dc9a4c5/jsh-0.3.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6971e2676bbfeb002a84d95a05e35073", "sha256": "0f1ee460db44619a98c81723c3e73b2572d2359148d42b403a16340f05d697bc" }, "downloads": -1, "filename": "jsh-0.3.4.tar.gz", "has_sig": false, "md5_digest": "6971e2676bbfeb002a84d95a05e35073", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5813, "upload_time": "2015-06-30T13:59:12", "url": "https://files.pythonhosted.org/packages/b9/11/58ad80fe32611ac39583290c0762fb9bd22c6ef82747a078c1db7fbc01f7/jsh-0.3.4.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "48d600ae903b1efe8453636cb2167cc5", "sha256": "e2b80492394362f21ffe41c66b787c35c43b9f5edc5d5afcaef667825bd010f8" }, "downloads": -1, "filename": "jsh-0.3.6-py2-none-any.whl", "has_sig": false, "md5_digest": "48d600ae903b1efe8453636cb2167cc5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8069, "upload_time": "2015-08-19T12:20:01", "url": "https://files.pythonhosted.org/packages/30/4c/e384eda16643155e998c0dd9a708610679ba24f836bcbd1a557214b87304/jsh-0.3.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2a036df57380aaac23f5e0fb37d7c39", "sha256": "73e86421d409e5a30df4954ae89d5d08c8c59bb147387f86d88c9bf3689f313b" }, "downloads": -1, "filename": "jsh-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a2a036df57380aaac23f5e0fb37d7c39", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8069, "upload_time": "2015-08-19T12:20:00", "url": "https://files.pythonhosted.org/packages/6c/90/9a6b47d964f0df63543c0687970cdd7afacfa0bab67c0bf9d79b247979c0/jsh-0.3.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d449584d1e33eee7e8a1d3c80fa51714", "sha256": "9f5f929fbda895f09663b23c12845720d08502e4e95bc5b7be62cb664efe9370" }, "downloads": -1, "filename": "jsh-0.3.6.tar.gz", "has_sig": false, "md5_digest": "d449584d1e33eee7e8a1d3c80fa51714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9962, "upload_time": "2015-08-19T12:20:11", "url": "https://files.pythonhosted.org/packages/9b/9f/e0c300dbfff397c4f2758184005f1338f76f055be1b7484b32d2056030a2/jsh-0.3.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "48d600ae903b1efe8453636cb2167cc5", "sha256": "e2b80492394362f21ffe41c66b787c35c43b9f5edc5d5afcaef667825bd010f8" }, "downloads": -1, "filename": "jsh-0.3.6-py2-none-any.whl", "has_sig": false, "md5_digest": "48d600ae903b1efe8453636cb2167cc5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8069, "upload_time": "2015-08-19T12:20:01", "url": "https://files.pythonhosted.org/packages/30/4c/e384eda16643155e998c0dd9a708610679ba24f836bcbd1a557214b87304/jsh-0.3.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2a036df57380aaac23f5e0fb37d7c39", "sha256": "73e86421d409e5a30df4954ae89d5d08c8c59bb147387f86d88c9bf3689f313b" }, "downloads": -1, "filename": "jsh-0.3.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a2a036df57380aaac23f5e0fb37d7c39", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8069, "upload_time": "2015-08-19T12:20:00", "url": "https://files.pythonhosted.org/packages/6c/90/9a6b47d964f0df63543c0687970cdd7afacfa0bab67c0bf9d79b247979c0/jsh-0.3.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d449584d1e33eee7e8a1d3c80fa51714", "sha256": "9f5f929fbda895f09663b23c12845720d08502e4e95bc5b7be62cb664efe9370" }, "downloads": -1, "filename": "jsh-0.3.6.tar.gz", "has_sig": false, "md5_digest": "d449584d1e33eee7e8a1d3c80fa51714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9962, "upload_time": "2015-08-19T12:20:11", "url": "https://files.pythonhosted.org/packages/9b/9f/e0c300dbfff397c4f2758184005f1338f76f055be1b7484b32d2056030a2/jsh-0.3.6.tar.gz" } ] }