{ "info": { "author": "Yasha Bubnov", "author_email": "girokompass@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "# Flagparse\n\n[![Build Status][BuildStatus]](https://travis-ci.org/ybubnov/flagparse)\n\n\nFlagparse is a library for building modular command-line interfaces with\naccent on nested commands. This library removes the pain of manually\nconstructing the argument parsing and applying handler for each command, all\nof this is done by this tiny library.\n\n## Installation\n\n```bash\npip install flagparse\n```\n\n## Usage and documentation\n\nPlease see the [wiki][Wiki] for basic usage and other documentation of using\nflagparse.\n\nHere is an example of a simple Flagparse app:\n```py\nimport flagparse\n\n\nclass Sum(flagparse.SubCommand):\n \"\"\"Sub-command to handle numbers summation.\"\"\"\n\n name = \"sum\"\n arguments = [\n ([\"integers\"],\n dict(metavar=\"INT\",\n type=int,\n nargs=\"+\",\n help=\"integers to be summed\")),\n ]\n\n def handle(self, args: flagparse.Namespace) -> None:\n print(sum(args.integers))\n\n\nclass Calc(flagparse.Command):\n \"\"\"A simple calculator that sums numbers.\"\"\"\n\n name = \"calc\"\n\n\nif __name__ == \"__main__\":\n Calc(subcommands=[Sum]).parse()\n```\n\nHow it looks when run:\n```bash\n$ python main.py sum 1 2 3\n6\n```\n\n## License\n\nThe openflow library is distributed under MIT license, therefore you are free\nto do with code whatever you want. See the [LICENSE](LICENSE) file for full\nlicense text.\n\n[BuildStatus]: https://travis-ci.org/ybubnov/flagparse.svg?branch=master\n[Wiki]: https://github.com/ybubnov/flagparse/wiki\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ybubnov/flagparse", "keywords": "arguments cli parse", "license": "", "maintainer": "", "maintainer_email": "", "name": "flagparse", "package_url": "https://pypi.org/project/flagparse/", "platform": "", "project_url": "https://pypi.org/project/flagparse/", "project_urls": { "Homepage": "https://github.com/ybubnov/flagparse" }, "release_url": "https://pypi.org/project/flagparse/0.0.3/", "requires_dist": null, "requires_python": ">=3.6", "summary": "flagparse is library to build command-line interfaces", "version": "0.0.3" }, "last_serial": 6000649, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "05ffdd19e11c0ba7519d44b928d091f8", "sha256": "63d159ac7957558dfa8bfadc2ddfa7fbd063204f4f669ed7fab8e60ad846ef8e" }, "downloads": -1, "filename": "flagparse-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "05ffdd19e11c0ba7519d44b928d091f8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 4823, "upload_time": "2019-09-27T08:37:41", "url": "https://files.pythonhosted.org/packages/74/a7/49b1bab89d476531fe87e8a9a34061cb5300471de6bed294433c0df8f578/flagparse-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97adc3bfce93c7b278544a72dcc4c1a4", "sha256": "caa7b1d93560f1ed3f49badf1df65489e472b460702f31096640b7744ac7bc0b" }, "downloads": -1, "filename": "flagparse-0.0.1.tar.gz", "has_sig": false, "md5_digest": "97adc3bfce93c7b278544a72dcc4c1a4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3848, "upload_time": "2019-09-27T08:37:45", "url": "https://files.pythonhosted.org/packages/f9/0e/85d441a24567e7ce9e45eeba969a746c1d56afd122deeb5c8575340e52b5/flagparse-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "beeedf2b6b6e15b14a13d939adceffd1", "sha256": "fe5aa5f41c3a274a15871665dcb00ffdd72a53c9fea74b29eb1e51b80aea036a" }, "downloads": -1, "filename": "flagparse-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "beeedf2b6b6e15b14a13d939adceffd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 4819, "upload_time": "2019-09-28T18:07:42", "url": "https://files.pythonhosted.org/packages/aa/17/a6df1e4e711671db00df3d58ec6f1d1fafee74e7b0111a761a6a7cdd70cc/flagparse-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "565cf2fd1fd24cbf2e69921e12c34f51", "sha256": "037c1d68c776f59236ae9b82e8c1cb460d4e527f83f5fbaa201e76fbb131a1ab" }, "downloads": -1, "filename": "flagparse-0.0.2.tar.gz", "has_sig": false, "md5_digest": "565cf2fd1fd24cbf2e69921e12c34f51", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3844, "upload_time": "2019-09-28T18:07:44", "url": "https://files.pythonhosted.org/packages/45/22/c434a7f7d36d2ca42468fa083b2f2cfdc832008eab6bc9ed933ee810cb6d/flagparse-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4dbe45fa9f496a3c04534b99eb3667c6", "sha256": "000d71d35e556a30c49515889c0d10b4f9acb4ef398e0452d132f54648230b99" }, "downloads": -1, "filename": "flagparse-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4dbe45fa9f496a3c04534b99eb3667c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 4864, "upload_time": "2019-10-19T18:29:37", "url": "https://files.pythonhosted.org/packages/f7/56/aab593b71df9fbde91e6349875b098e9d8198d79ebe4c4b2749b1959f9b5/flagparse-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "525422a9f119e38423b2dae2ea0061f0", "sha256": "17fd07ce5fbb22e04adf441044cfed488e204af0b674a32d1786e2722f096746" }, "downloads": -1, "filename": "flagparse-0.0.3.tar.gz", "has_sig": false, "md5_digest": "525422a9f119e38423b2dae2ea0061f0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3920, "upload_time": "2019-10-19T18:29:39", "url": "https://files.pythonhosted.org/packages/a8/f3/e70702c1ab04b0219f01093e6d0f35b534856c8dee38365591cbc682facc/flagparse-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4dbe45fa9f496a3c04534b99eb3667c6", "sha256": "000d71d35e556a30c49515889c0d10b4f9acb4ef398e0452d132f54648230b99" }, "downloads": -1, "filename": "flagparse-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4dbe45fa9f496a3c04534b99eb3667c6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 4864, "upload_time": "2019-10-19T18:29:37", "url": "https://files.pythonhosted.org/packages/f7/56/aab593b71df9fbde91e6349875b098e9d8198d79ebe4c4b2749b1959f9b5/flagparse-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "525422a9f119e38423b2dae2ea0061f0", "sha256": "17fd07ce5fbb22e04adf441044cfed488e204af0b674a32d1786e2722f096746" }, "downloads": -1, "filename": "flagparse-0.0.3.tar.gz", "has_sig": false, "md5_digest": "525422a9f119e38423b2dae2ea0061f0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3920, "upload_time": "2019-10-19T18:29:39", "url": "https://files.pythonhosted.org/packages/a8/f3/e70702c1ab04b0219f01093e6d0f35b534856c8dee38365591cbc682facc/flagparse-0.0.3.tar.gz" } ] }