{ "info": { "author": "Viliam Krizan", "author_email": "vkrizan@redhat.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "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", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: User Interfaces", "Topic :: Terminals" ], "description": "Simple Multi Command Line Parser\n================================\n\n.. image:: https://travis-ci.org/vkrizan/python-smclip.svg?branch=master\n :target: https://travis-ci.org/vkrizan/python-smclip\n\n.. image:: https://codecov.io/github/vkrizan/python-smclip/coverage.svg?branch=master\n :target: https://codecov.io/github/vkrizan/python-smclip?branch=master\n\nSMCLIP is a simple framework for parsing multi command line arguments using\npython's builtin ArgumentParser. With SMCLIP you are able to built git-like\ncommands. Commands are created by inheriting from base Command classes and\nextending their callbacks.\n\nCore features includes:\n\n- building trees of multi-level sub-commands\n- support for default sub-commands (e.g. ``git stash [save]``)\n- support for fallback sub-commands (when sub-command is not found; e.g.\n catching ID)\n- support for chained sub-commands\n- sub-command lazy loading\n\n\nDifferences with ...\n--------------------\n\nWhy you should choose SMCLIP when [X] supports sub-commands?\n\nArgumentParser\n^^^^^^^^^^^^^^\n\nhttps://docs.python.org/3/library/argparse.html#sub-commands\n\nPython's ArgumentParser support sub-commands by adding sub-parsers to\nthe parent parser. The ArgumentParser with sub-commands considers\nthat a CLI application is simple and does simple operations.\nA CLI application starts can get confusing to users (in help) when\nthere are more and more sub-commands being added.\n\nSubparsers of ArgumentParser should be constructed prior to\ncalling the base parser. Subparsers don not support any routing\nbased on the commands.\n\n\nClick\n^^^^^\n\nhttp://click.pocoo.org/latest/\n\nClick utilizes Python's decorators to create sub-commands hierarchy.\nUsing decorators makes the code more readable. On the other hand,\nextending Click is done by creating new decorators.\nSupporting new parsing techniques (default or fallback commands) and\nconditional callback triggering is not done simplistically.\n\n\nCement\n^^^^^^\n\nhttp://builtoncement.com/\n\nCement is a framework intended for complex CLI applications. Cement\ncomes with multiple set of utilities (logging, caching). Command line\nparsing is a one part of Cement framework. Cement support sub-commands\nby nesting controllers. Default and fallback commands and conditional\ncallback triggering is done by extending core controllers.\n\n\nArgument Examples\n-----------------\n\n::\n\n # Simple command\n (1)$ app help\n *--*\n +---- sub-command of base application\n\n # Two commands\n (2)$ app task list\n (3)$ app --debug task list --listopt\n *----+----* *--* *-----+------*\n \\ \\ \\\n \\ \\ +------- list sub-command with option\n \\ +---------------- task command\n +----------------------- application with its own option\n\n # fallback command\n (4)$ app task 1234 --viewopt\n *-----+------*\n \\\n +------- fallback command catching ID\n\n # chained commands\n (5)$ app task 1234 change --state ASSIGNED assign person\n *----------+----------* *-----+-----*\n | \\\n \\ +------ chained command\n \\ with positional\n \\ argument\n \\\n +---------------------- chained command\n with option\n\nCallbacks\n---------\n\n``preprocess``\n^^^^^^^^^^^^^^\n\n``preprocess`` is called after successful parsing of command's arguments.\nInvocation is done even when a sub-command is being called.\n``preprocess`` is not called when default command is in effect.\n\n\n``this_action``\n^^^^^^^^^^^^^^^\n\n``this_action`` is a main callback for actions in current command.\nThis callback is called after ``preprocess`` and only when current command\nis final (no other sub-commands are being invoked). Exceptions are\nchained command, in which the ``this_action`` is invoked every time.\n\n\n``results_callback``\n^^^^^^^^^^^^^^^^^^^^\n\n(commands group only)\n\n``results_callback`` is called after a sub-command invocation is done.\nA return value from sub-command, returned by ``this_action`` callback,\nis passed as a positional argument. Results from chained commands\nare wrapped and passed in ``ChainedOutputResults`` class object.\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/vkrizan/python-smclip", "keywords": "cli,argument parser,multi commands", "license": "LGPLv3+", "maintainer": "", "maintainer_email": "", "name": "smclip", "package_url": "https://pypi.org/project/smclip/", "platform": "", "project_url": "https://pypi.org/project/smclip/", "project_urls": { "Homepage": "https://github.com/vkrizan/python-smclip" }, "release_url": "https://pypi.org/project/smclip/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Simple Multi Command Line Parser", "version": "0.3.0" }, "last_serial": 3241794, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "82e8fd6e9ff644e8c7efcd65a1ab62f7", "sha256": "2bc394d6c4a36c4d8c2ef84af048e6741e0cd994a71e94006239f34a443c63d9" }, "downloads": -1, "filename": "smclip-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82e8fd6e9ff644e8c7efcd65a1ab62f7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11524, "upload_time": "2016-03-10T12:37:20", "url": "https://files.pythonhosted.org/packages/dd/41/bd087935fa0d468d7bbedca274f47bc59cc49ab555110db846420bfff00e/smclip-0.1-py2.py3-none-any.whl" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4bb695f99469459369cf881a0bf82981", "sha256": "2503b758baf1fba91be8df9f3c13fd54926c2239032c372b8ca090f05e6ca54e" }, "downloads": -1, "filename": "smclip-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4bb695f99469459369cf881a0bf82981", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11711, "upload_time": "2016-03-22T15:55:46", "url": "https://files.pythonhosted.org/packages/1b/aa/6114297b2d2bb4bed4e5cf616706784374053d32b0984bdaecd6684c1485/smclip-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a32a3fd5c8807063f49b58f25714b482", "sha256": "89dcde5e9b28b203f1ee0122bc10d7f8a6dd2c0e084e1e7f378cf4b7db9613df" }, "downloads": -1, "filename": "smclip-0.2.tar.gz", "has_sig": false, "md5_digest": "a32a3fd5c8807063f49b58f25714b482", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10213, "upload_time": "2016-03-23T09:22:21", "url": "https://files.pythonhosted.org/packages/ab/8a/49571b450826049e62f8258cc6c7e5d11c23db1e757b36048f75bd0d3c31/smclip-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0170e8f4ef1f678f52df6f28931ed598", "sha256": "13ce20bccb9c81883e0278454d3cfc931f44781de323f0ce0a360e22a68217ff" }, "downloads": -1, "filename": "smclip-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0170e8f4ef1f678f52df6f28931ed598", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11766, "upload_time": "2016-07-14T13:14:23", "url": "https://files.pythonhosted.org/packages/06/59/d32c05d16a1ec65a3feefa2c8fb110d574f432faa856035cd6dd0ea4edf1/smclip-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e93c4c83baf9002cf4462ef364cf317", "sha256": "0a19f2adb769f3cecc92e11a75027332d28c8b798ca8b483cde7df50e369a78e" }, "downloads": -1, "filename": "smclip-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4e93c4c83baf9002cf4462ef364cf317", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10246, "upload_time": "2016-07-14T13:14:26", "url": "https://files.pythonhosted.org/packages/6a/06/0d8b9a47efd219938e13dc963ae0f3fe7c287f55adbdcdf68bddf61229fb/smclip-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "c32034c3e655779c051353d5fda0029e", "sha256": "25b0b012df4d7951fb777250dc33605aef793e31b9aa5e08b189531f49e16aa6" }, "downloads": -1, "filename": "smclip-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c32034c3e655779c051353d5fda0029e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11763, "upload_time": "2016-10-26T15:21:24", "url": "https://files.pythonhosted.org/packages/de/38/e5e18662dbc28784412cce92e590df227d82388e300f09a008f6f1c221bf/smclip-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c32509dfe3aa50fdb7587d5da81efc2", "sha256": "765d2af02c3486d196b79356ea22795b6e30674f8ab5d9a63db11a38ed82bc90" }, "downloads": -1, "filename": "smclip-0.2.2.tar.gz", "has_sig": false, "md5_digest": "9c32509dfe3aa50fdb7587d5da81efc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16604, "upload_time": "2016-10-26T15:21:26", "url": "https://files.pythonhosted.org/packages/ee/e0/1a9b851ffe9a55613b26dbb5ea493e868662f4dc90d967b7c0d9b8bf5233/smclip-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b964497b32f2d5f230edb13f4757b0b1", "sha256": "70dcab275ac5bc3dca34df5a8d6507b163131e22401e98dccb47ef0f2d8270c0" }, "downloads": -1, "filename": "smclip-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b964497b32f2d5f230edb13f4757b0b1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12553, "upload_time": "2017-10-11T11:38:57", "url": "https://files.pythonhosted.org/packages/7b/69/703023ea511fca630516d2571b23a2056abd7443322cf2a590a9bdfcc13e/smclip-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e30a675cb35efd53e177e8f5dd789327", "sha256": "ffe111e9a127cbe11a6687df95a3c89108d2893da0a327b7f4f63e1e12266af1" }, "downloads": -1, "filename": "smclip-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e30a675cb35efd53e177e8f5dd789327", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17876, "upload_time": "2017-10-11T11:39:10", "url": "https://files.pythonhosted.org/packages/14/b7/c2c15d6ef5e7b63d59e56467eef0c7ea442b98281655113d361464e7ac67/smclip-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b964497b32f2d5f230edb13f4757b0b1", "sha256": "70dcab275ac5bc3dca34df5a8d6507b163131e22401e98dccb47ef0f2d8270c0" }, "downloads": -1, "filename": "smclip-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b964497b32f2d5f230edb13f4757b0b1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12553, "upload_time": "2017-10-11T11:38:57", "url": "https://files.pythonhosted.org/packages/7b/69/703023ea511fca630516d2571b23a2056abd7443322cf2a590a9bdfcc13e/smclip-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e30a675cb35efd53e177e8f5dd789327", "sha256": "ffe111e9a127cbe11a6687df95a3c89108d2893da0a327b7f4f63e1e12266af1" }, "downloads": -1, "filename": "smclip-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e30a675cb35efd53e177e8f5dd789327", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17876, "upload_time": "2017-10-11T11:39:10", "url": "https://files.pythonhosted.org/packages/14/b7/c2c15d6ef5e7b63d59e56467eef0c7ea442b98281655113d361464e7ac67/smclip-0.3.0.tar.gz" } ] }