{ "info": { "author": "Niklas Rosenstein", "author_email": "rosensteinniklas@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# `nr.cliparser`\n\n– Extensible CLI parser.\n\n*Work in progress*\n\n__Example__\n\n```python\nimport nr.cliparser\n\nparser = nr.cliparser.Parser()\nparser.argument('-h', nargs=0, help='Show this help.')\nparser.argument('script', nargs='?', help='A script to run.')\nparser.argument('argv', nargs='...', help='Arguments for the script.')\n\ninstall = parser.subparser('--install', help='Install a packge.')\ninstall.argument('ref', nargs='?', multiple=True, help='A package reference.')\ninstall.argument('-e', metavar='ref', help='A package reference to install editable.', multiple=True)\ninstall.argument('-g', nargs=0, help='Install globally.')\ninstall.argument('-r', nargs=0, help='Install into root.')\n\nargs = parser.parse()\nif args['h']:\n parser.print_help()\n exit()\n\nprint(args)\n```\n\n```\n$ python3 example.py -h\nusage: example -h [script] ... --install [ [ref] -e -g -r ] \n\n-h Show this help. \n[script] A script to run. \n... Arguments for the script. 8-\n--install [ ... ] Install a packge. \n [ref] A package reference. \n -e A package reference to install editable. \n -g Install globally. \n -r Install into root. \n\n$ python3 example.py --install -e scope@package \n{'install': {'e': ['scope@package'], 'ref': [], 'g': False, 'r': False}, 'h': False, 'script': None, 'argv': []}\n```\n\n### Changes\n\n#### v0.1.1 (2018-09-20)\n\n* Fix Python 2 compatibility\n\n#### v0.1.0 (2018-09-20)\n\n* Initial release", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.niklasrosenstein.com/NiklasRosenstein/python/nr.cliparser", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nr.cliparser", "package_url": "https://pypi.org/project/nr.cliparser/", "platform": "", "project_url": "https://pypi.org/project/nr.cliparser/", "project_urls": { "Homepage": "https://gitlab.niklasrosenstein.com/NiklasRosenstein/python/nr.cliparser" }, "release_url": "https://pypi.org/project/nr.cliparser/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Extensible CLI parser.", "version": "0.1.1" }, "last_serial": 4293858, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c4e4bb08c24d7397aed7650207c8dfb5", "sha256": "62e1ae23b99885a32a1649663de9799bf31009f0aad8d905b92cc5b426677048" }, "downloads": -1, "filename": "nr.cliparser-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c4e4bb08c24d7397aed7650207c8dfb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8100, "upload_time": "2018-09-20T17:10:17", "url": "https://files.pythonhosted.org/packages/8f/df/1d061d0e67a4c56544fc0977724f3bbe70ef90fad5bc52ad2ca5c53ab67c/nr.cliparser-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9ea321be06c76bda6c4c417608cefca8", "sha256": "d51fe87d0ed90947ca81c87b22bb208f4f146163d295ab62f2ecf496963518c9" }, "downloads": -1, "filename": "nr.cliparser-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9ea321be06c76bda6c4c417608cefca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8247, "upload_time": "2018-09-20T19:02:29", "url": "https://files.pythonhosted.org/packages/77/6c/d545e67365c3d1f5a22e5f68c9b6469b77310c16207118397da8a0e50082/nr.cliparser-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ea321be06c76bda6c4c417608cefca8", "sha256": "d51fe87d0ed90947ca81c87b22bb208f4f146163d295ab62f2ecf496963518c9" }, "downloads": -1, "filename": "nr.cliparser-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9ea321be06c76bda6c4c417608cefca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8247, "upload_time": "2018-09-20T19:02:29", "url": "https://files.pythonhosted.org/packages/77/6c/d545e67365c3d1f5a22e5f68c9b6469b77310c16207118397da8a0e50082/nr.cliparser-0.1.1.tar.gz" } ] }