{ "info": { "author": "flgy", "author_email": "florian.guilbert@synacktiv.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "# commandparse\n\nModule to parse command based CLI application.\n\nUsage:\n\n* Subclass the Command class\n* Add a method with a name such as `prefix_commandname` with kwargs as required argument\n* Create a an ArgumentParser and declare a subparser per command\n* Register the commands in a dictionary\n* Use the `dispatch_command` function with the commands and args returned by `parser.parse_args()`\n\n```\nparser = ArgumentParser(...)\n[...]\nsub = parser.add_subparsers(title=\"commands\", dest=\"command\", description=\"available commands\")\n\n# Registering commands\ncommands = {}\nfor command, method in Subclass.get_commands(prefix=\"prefix_\"):\n\tSubclass.set_subparser_for(command, method, sub)\n\tcommands[command] = method\n[...]\nargs = parser.parse_args()\n\nif args.command:\n\tcmd = Subclass(...)\n\tcmd.dispatch_command(commands, args)\nelse:\n\tparser.print_usage()\n```\n\nSee example.py for a more complete example. For a real world application using this lib, see: https://github.com/franc-pentest/ldeep", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/flgy/commandparse", "keywords": "CLI,command,argparse,parser", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "commandparse", "package_url": "https://pypi.org/project/commandparse/", "platform": "any", "project_url": "https://pypi.org/project/commandparse/", "project_urls": { "Homepage": "https://github.com/flgy/commandparse" }, "release_url": "https://pypi.org/project/commandparse/1.0.8/", "requires_dist": null, "requires_python": "", "summary": "CLI application commands parser", "version": "1.0.8" }, "last_serial": 4680818, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "38f8c198f2ca187244dc513a93b019e8", "sha256": "ae1c89c0974ecf8190ea68552e60b5f5ae79080bd269757f170c661fafd0cf24" }, "downloads": -1, "filename": "commandparse-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "38f8c198f2ca187244dc513a93b019e8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 5273, "upload_time": "2018-12-12T21:42:11", "url": "https://files.pythonhosted.org/packages/d6/9a/c7976b2506ac62716f70f488cc1f2be2a06029936471fdbd9b2d12e3d1c2/commandparse-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6e0ef14af65dcaeae0025ef59fff0b21", "sha256": "d860010ff61a3f165e09b72c1a4f1dec2abb88d4a2ae2707d660bc7cff7b2289" }, "downloads": -1, "filename": "commandparse-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6e0ef14af65dcaeae0025ef59fff0b21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3844, "upload_time": "2018-12-12T21:42:13", "url": "https://files.pythonhosted.org/packages/8f/39/0ce3e068f9dd425c7706fd5c219f7539537d8f8cdc9f92b0b6f5bb634685/commandparse-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b7a3ea09817ea4753fc379d0e39c6c60", "sha256": "5c3c72fa079e73a65678d2fb03117df77baa13d2248b6ce552bd2983a8f98c12" }, "downloads": -1, "filename": "commandparse-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b7a3ea09817ea4753fc379d0e39c6c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3841, "upload_time": "2018-12-12T21:51:41", "url": "https://files.pythonhosted.org/packages/8d/44/40abc75c82fecd09a2212286108b6c3f50582886aa8491928ddb96d321e1/commandparse-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b80a7dee92ab11d5a06104c6bddaa4a3", "sha256": "9a1b663be382223004e96afc40870970c5191568ec82ce082d37866dd66d4487" }, "downloads": -1, "filename": "commandparse-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b80a7dee92ab11d5a06104c6bddaa4a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3911, "upload_time": "2018-12-12T22:11:26", "url": "https://files.pythonhosted.org/packages/42/05/f557132411fef8691beec721fe8060d7b40d14f7bb112e48b8a8704dd978/commandparse-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "766747809ef8cabf7465e2041c03a4f8", "sha256": "b4eb0acecefcecb4071084812b54b71e6b12af1f6180da618ee1fa03bad0873c" }, "downloads": -1, "filename": "commandparse-1.0.3.tar.gz", "has_sig": false, "md5_digest": "766747809ef8cabf7465e2041c03a4f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3920, "upload_time": "2018-12-19T11:05:15", "url": "https://files.pythonhosted.org/packages/6e/1f/59d0ec3ffd98ebbeacc3404a04f70bbe2823f331558bb569afa433cbf6df/commandparse-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "a3dea8bd02aebddaef7f63992033c098", "sha256": "0d823c3310ca660dfd575ceca376461ddcc087203844dff16aa80fd4767db8db" }, "downloads": -1, "filename": "commandparse-1.0.4.tar.gz", "has_sig": false, "md5_digest": "a3dea8bd02aebddaef7f63992033c098", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3933, "upload_time": "2018-12-26T10:59:42", "url": "https://files.pythonhosted.org/packages/d7/75/a060d75adf222286ed8c46d7371e3ff2a10063529ed940f13a08cd4b031d/commandparse-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "f9b646bdd276b0be1ae7bd3b695d1c70", "sha256": "052ee46ef89a6702cf18d4debf2b9903c429a07455278bce70b0e5c285748cef" }, "downloads": -1, "filename": "commandparse-1.0.5.tar.gz", "has_sig": false, "md5_digest": "f9b646bdd276b0be1ae7bd3b695d1c70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3942, "upload_time": "2018-12-26T11:02:26", "url": "https://files.pythonhosted.org/packages/8c/6a/194e9de12e1c8c42a37cefebdf01f491f3404fed53d30204fdb7547d66a6/commandparse-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "3c26e214ab99252e4bacc85dcb6cbe6d", "sha256": "d5d1a91f9a0e36a22aaf1fd4ee0c7b8d062671643b8a5a254ef330a226a144d5" }, "downloads": -1, "filename": "commandparse-1.0.6.tar.gz", "has_sig": false, "md5_digest": "3c26e214ab99252e4bacc85dcb6cbe6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3937, "upload_time": "2018-12-26T11:06:20", "url": "https://files.pythonhosted.org/packages/2a/2a/4f5403134650fd0b53a40b81272ec46a33c7097f4cf28a7b4edce1e61daa/commandparse-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "72c7535170938c3b97cb793761365f5e", "sha256": "fdc1767e8926d029e91191b30d2799a07f632d18840a1b9c30c2f801cabc1d18" }, "downloads": -1, "filename": "commandparse-1.0.7.tar.gz", "has_sig": false, "md5_digest": "72c7535170938c3b97cb793761365f5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4193, "upload_time": "2019-01-10T11:00:36", "url": "https://files.pythonhosted.org/packages/1e/9a/ffe08dbd3861a7b0298c13fb93f35d7d06f7dae17be50b1edac42337c854/commandparse-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "14db48a83f9cab5ea3be46557bd8359c", "sha256": "97a67f5ca4c38a93cb3bf74674f666c0789d88b1473fa57d564f9166ef4ae785" }, "downloads": -1, "filename": "commandparse-1.0.8.tar.gz", "has_sig": false, "md5_digest": "14db48a83f9cab5ea3be46557bd8359c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4211, "upload_time": "2019-01-10T11:57:14", "url": "https://files.pythonhosted.org/packages/e5/38/c2a10b4afb81787588dc9991c253f546093f7e0d92fcda36daaa76580d2c/commandparse-1.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14db48a83f9cab5ea3be46557bd8359c", "sha256": "97a67f5ca4c38a93cb3bf74674f666c0789d88b1473fa57d564f9166ef4ae785" }, "downloads": -1, "filename": "commandparse-1.0.8.tar.gz", "has_sig": false, "md5_digest": "14db48a83f9cab5ea3be46557bd8359c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4211, "upload_time": "2019-01-10T11:57:14", "url": "https://files.pythonhosted.org/packages/e5/38/c2a10b4afb81787588dc9991c253f546093f7e0d92fcda36daaa76580d2c/commandparse-1.0.8.tar.gz" } ] }