{ "info": { "author": "Kadir Pekel", "author_email": "kadirpekel@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=======\nkomandr\n=======\n\nConvert your ordinary functions into cool command-line interfaces!\n\nKomandr is a smart thin wrapper around powerful `argparse` module lets you\nbuild defacto standart command-line interfaces in secondz while providing you\nall the flexibity.\n\nExample\n-------\n::\n\n # example.py\n\n from komandr import *\n\n\n # straigforward ad-hoc usage\n @command\n def foo(bar, baz=None):\n print 'foo', bar, baz\n\n\n # but also it allows you much more tuning\n @command(name='cool_command_name')\n @arg('baz', '-z', required=True, type=int)\n def lame_command_name(foo, bar, baz=1):\n print 'lame_command_name', foo, bar, baz\n\n if __name__ == '__main__':\n main()\n\n\nNeed some help?::\n\n $ python example.py --help\n usage: example.py [-h] [-v] {foo,cool_command_name} ...\n\n positional arguments:\n {foo,cool_command_name}\n\n optional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n\nLet's investigate more about `foo`::\n\n $ python example.py foo --help\n usage: example.py foo [-h] --baz BAZ bar\n\n positional arguments:\n bar\n\n optional arguments:\n -h, --help show this help message and exit\n --baz BAZ\n\nTest `foo` command::\n\n $ python example.py foo Hello\n usage: example.py foo [-h] --baz BAZ bar\n example.py foo: error: argument --baz is required\n\nThat's ok now::\n\n $ python example.py foo Hello --baz World\n foo Hello World\n\nCool, eh?\n\nThis also shows how flexible and configurable it is::\n\n $ python example.py cool_command_name Hello -z 'Non numeric' World\n usage: example.py cool_command_name [-h] --baz BAZ foo bar\n example.py cool_command_name: error: argument --baz/-z: invalid int value: 'Non Numeric'\n\nCorrect one should be::\n\n $ python example.py cool_command_name Hello -z 2013 World\n lame_command_name Hello World 2013\n\nEnjoy!\n\nLicence\n-------\nCopyright (c) 2012 Kadir Pekel.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kadirpekel/komandr", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "komandr", "package_url": "https://pypi.org/project/komandr/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/komandr/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kadirpekel/komandr" }, "release_url": "https://pypi.org/project/komandr/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Coolest command-line interface on this planet", "version": "0.1.1" }, "last_serial": 793975, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "5fcf08ef0844ebfc76ea3abfb288cbf4", "sha256": "01cee6adcfadb04d6bff4e5272e63ce28689a21e6ec302dd70c3e68d8fe8079b" }, "downloads": -1, "filename": "komandr-0.0.4.tar.gz", "has_sig": false, "md5_digest": "5fcf08ef0844ebfc76ea3abfb288cbf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2321, "upload_time": "2012-12-18T13:13:06", "url": "https://files.pythonhosted.org/packages/e8/c5/47995a6e8744d081325d552bd3ab243f0c7c671e336aa036067e5620a1da/komandr-0.0.4.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f62497b1c01bb0e3f4b54f42d54e897d", "sha256": "802cdde9a2a63107de0a60efb1ff3faf1433278f008a1623d50d0df830364756" }, "downloads": -1, "filename": "komandr-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f62497b1c01bb0e3f4b54f42d54e897d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2963, "upload_time": "2012-12-19T09:55:59", "url": "https://files.pythonhosted.org/packages/60/ca/c6acf29b95456842fde63fb2ff3f8611e49382b47c82e63949d63d58bd88/komandr-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "9bbf910fa31c106c443249a0e02be6ba", "sha256": "3298d939bf87dfc5501ce050e75525faff40d02059f439a4f69ad9f6c2f72461" }, "downloads": -1, "filename": "komandr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9bbf910fa31c106c443249a0e02be6ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3398, "upload_time": "2012-12-19T12:30:49", "url": "https://files.pythonhosted.org/packages/c4/b6/85916c840bf829f15049b604f58505a13f17676cfb1097d84be7366d60e7/komandr-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9596ea0277f8bc4b0b213d08305212d2", "sha256": "b7f1a398e30af74061690337887ae15f8bc8e509447efa12cd3ae2ccc9e1d414" }, "downloads": -1, "filename": "komandr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9596ea0277f8bc4b0b213d08305212d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3450, "upload_time": "2012-12-19T19:48:11", "url": "https://files.pythonhosted.org/packages/f1/34/b3083c360ae4812040a171cd62dd6c75c7e24ff6b00ae46332b1445e05fc/komandr-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9596ea0277f8bc4b0b213d08305212d2", "sha256": "b7f1a398e30af74061690337887ae15f8bc8e509447efa12cd3ae2ccc9e1d414" }, "downloads": -1, "filename": "komandr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9596ea0277f8bc4b0b213d08305212d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3450, "upload_time": "2012-12-19T19:48:11", "url": "https://files.pythonhosted.org/packages/f1/34/b3083c360ae4812040a171cd62dd6c75c7e24ff6b00ae46332b1445e05fc/komandr-0.1.1.tar.gz" } ] }