{ "info": { "author": "Mark Muetzelfeldt", "author_email": "markmuetz@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7" ], "description": "Commandify\n==========\n\nAllows simple creation of Python command line utilities through decorating functions. Builds on the ``argparse`` module in the standard library. Optionally uses the ``argcomplete`` module to provide command line tab-completion for bash/zsh.\n\nInstallation\n============\n\n::\n\n pip install commandify\n\nRunning example and usage\n=========================\n\nOnce commandify has been installed, it can be run with:\n\n::\n\n commandify_examples --help\n\n\n``commandify_examples`` code:\n\n.. code:: python\n\n #!/usr/bin/env python\n # Only required if you want to use argcomplete:\n # PYTHON_ARGCOMPLETE_OK\n '''Examples of a simple set of functions that use commandify\n usage::\n\n commandify_examples --help\n commandify_examples --help\n commandify_examples --main-arg=22 \n commandify_examples -m=22 \n commandify_examples cmd_no_args\n\n '''\n from commandify import commandify, command, main_command\n\n\n @main_command(main_arg={'flag': '-m'})\n def main(main_arg=345):\n '''Example of how to use commandify\n Main command, called before any other command\n Can be used to set any global variables before any other commands executed.\n usage::\n\n commandify_examples --help\n commandify_examples --main-arg=22 cmd_no_args\n commandify_examples -m=22 cmd_no_args\n commandify_examples cmd_no_args\n\n '''\n print(type(main_arg))\n print(\"Main command: {0}\".format(main_arg))\n\n\n @command\n def cmd_no_args():\n '''Simplest command\n usage::\n\n commandify_examples cmd_no_args\n\n '''\n print('cmd_no_args called')\n\n\n @command\n def cmd1(name):\n '''Simple command with argument\n usage::\n\n commandify_examples cmd1 --name=a1\n commandify_examples cmd1 --name a3\n commandify_examples cmd1 --name 'a4'\n\n '''\n print('cmd1 running')\n print(name)\n\n\n @command(username={'flag': '-n'})\n def cmd2(username, userid):\n '''Command with 2 args and a short flag set for name\n usage::\n\n commandify_examples cmd2 --username=steve --userid=55\n commandify_examples cmd2 -n=sarah --userid=56\n\n '''\n print('{0}: {1}'.format(userid, username))\n\n\n @command(some_arg={'default': 377})\n def cmd3(some_arg, arg_with_default='arg_default'):\n '''Command with defaults set in two ways\n first through decorator and second through function arguments.\n usage::\n\n commandify_examples cmd3\n commandify_examples cmd3 --arg-with-default=default_overridden\n\n '''\n # Type of some_arg will be int:\n print(type(some_arg))\n print(some_arg, arg_with_default)\n\n\n @command\n def cmd4(some_arg=False):\n '''Command with False bool default\n usage::\n\n commandify_examples cmd4\n commandify_examples cmd4 --some-arg\n\n '''\n # Type of some_arg will be bool:\n print(type(some_arg))\n # If it is called specifying --some-arg, it will be True.\n print(some_arg)\n\n\n @command\n def cmd5(some_arg=True):\n '''Command with True bool default\n Command line argument gets turned into negative to handle this.\n usage::\n\n commandify_examples cmd5\n commandify_examples cmd5 --not-some-arg\n\n '''\n # Type of some_arg will be bool:\n print(type(some_arg))\n # If it is called without specifying --not-some-arg, it will be True.\n print(some_arg)\n\n\n @command\n def cmd6():\n print('cmd6 called')\n\n\n if __name__ == '__main__':\n try:\n import argcomplete\n commandify(suppress_warnings=['default_true'], use_argcomplete=True)\n except ImportError:\n commandify(suppress_warnings=['default_true'])", "description_content_type": null, "docs_url": "https://pythonhosted.org/commandify/", "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/markmuetz/commandify", "keywords": "command line argument arguments", "license": null, "maintainer": null, "maintainer_email": null, "name": "commandify", "package_url": "https://pypi.org/project/commandify/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/commandify/", "project_urls": { "Homepage": "https://github.com/markmuetz/commandify" }, "release_url": "https://pypi.org/project/commandify/0.0.4.10/", "requires_dist": null, "requires_python": null, "summary": "Simple command line commands through decorators", "version": "0.0.4.10" }, "last_serial": 1570196, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a517e5e1fd16c6c47fa1ad9fb215704a", "sha256": "b042e8bd18715ebe3eff1efac9ed41f9a76cf324a70caa41fd4a6c2c1c68be4f" }, "downloads": -1, "filename": "commandify-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "a517e5e1fd16c6c47fa1ad9fb215704a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6880, "upload_time": "2015-05-23T11:00:57", "url": "https://files.pythonhosted.org/packages/c6/f1/2140e59ac624d2792d06f41bcec9e17fd9c1bbeb593a644273e3810a2962/commandify-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "cbb5bed8bf832b176329cfc442f45b95", "sha256": "5dc98529e926d7bffe2df121fda4fcbf40399f3fa3b52b5220ca17218775dd7b" }, "downloads": -1, "filename": "commandify-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cbb5bed8bf832b176329cfc442f45b95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133217, "upload_time": "2015-05-12T20:28:32", "url": "https://files.pythonhosted.org/packages/67/c5/2ef127a3d91e256740e48c1d3e9c815fae6e9aa087c547cd6581dc4728d1/commandify-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "32c6d6a1e19e0ab67d5ae302fa0c8743", "sha256": "e10932ac347f883528866a5c8a218b68876ee6c65a4163f86fb1a34dd85da003" }, "downloads": -1, "filename": "commandify-0.0.2.tar.gz", "has_sig": false, "md5_digest": "32c6d6a1e19e0ab67d5ae302fa0c8743", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133523, "upload_time": "2015-05-13T09:32:07", "url": "https://files.pythonhosted.org/packages/54/ec/6a6e55705cac04aca8ff5d750ededbdeccb1987e2eac8809eeff6cef275d/commandify-0.0.2.tar.gz" } ], "0.0.2.1": [ { "comment_text": "", "digests": { "md5": "6d985c86c8a2354bec17437ec9765a98", "sha256": "c6534c9567dfe9f4cf0b5930a08d6f6e8db084bf060729022df993dda7de8dd9" }, "downloads": -1, "filename": "commandify-0.0.2.1.tar.gz", "has_sig": false, "md5_digest": "6d985c86c8a2354bec17437ec9765a98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 133531, "upload_time": "2015-05-13T09:38:18", "url": "https://files.pythonhosted.org/packages/e3/c4/7dd04d7d0103e1ef53a145f909b9bd0043b3b70168b9a294cd3649fbd4b1/commandify-0.0.2.1.tar.gz" } ], "0.0.2.2": [ { "comment_text": "", "digests": { "md5": "28a27e81aa844abae02092f3b14b28a8", "sha256": "c22018e14761b1cfb7f56c48c04f3afc6eb5d58190411fe92ad39d28950e9e2e" }, "downloads": -1, "filename": "commandify-0.0.2.2.tar.gz", "has_sig": false, "md5_digest": "28a27e81aa844abae02092f3b14b28a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 134811, "upload_time": "2015-05-13T11:50:03", "url": "https://files.pythonhosted.org/packages/77/de/f61c1b3a2d3c4e7c990094bd88547c4e835a58a9843cf813287b6fb33854/commandify-0.0.2.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "10e01059df5b59a3752953fd46a112e5", "sha256": "07af544c8375c75cf8e6230f57fd9dabf8169bace2ba1568a6fb0a4ab1f1ec5c" }, "downloads": -1, "filename": "commandify-0.0.3.tar.gz", "has_sig": false, "md5_digest": "10e01059df5b59a3752953fd46a112e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135297, "upload_time": "2015-05-13T12:40:21", "url": "https://files.pythonhosted.org/packages/04/17/43b05db7ec0dcefaa4e6244261c1955c6c38e1a93fa17f0a14e1523bd918/commandify-0.0.3.tar.gz" } ], "0.0.3.1": [ { "comment_text": "", "digests": { "md5": "213dfaa04068bcbea0c6b104bdbac74d", "sha256": "2c8cf355770b056f34e5c41b1c8efb5eeb64d4cb9dc19f535edcb01c00696d68" }, "downloads": -1, "filename": "commandify-0.0.3.1.tar.gz", "has_sig": false, "md5_digest": "213dfaa04068bcbea0c6b104bdbac74d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135547, "upload_time": "2015-05-13T13:29:20", "url": "https://files.pythonhosted.org/packages/52/08/124022c1f4e44137cf51206f9e5f595a7523a8c4df976fc4a257d4a08bef/commandify-0.0.3.1.tar.gz" } ], "0.0.4.0": [ { "comment_text": "", "digests": { "md5": "3c87dc2f44adb3930280c14b149000b7", "sha256": "966b174b8bcd8f55467c883b5ea84d5cd6dee9eedd03b5ad01e51d0a5d45275b" }, "downloads": -1, "filename": "commandify-0.0.4.0.tar.gz", "has_sig": false, "md5_digest": "3c87dc2f44adb3930280c14b149000b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135804, "upload_time": "2015-05-14T08:09:48", "url": "https://files.pythonhosted.org/packages/db/4c/fca0ccc0825e0ab7f17a336e717bc3e5103f292d90ab6da770fefffa61d6/commandify-0.0.4.0.tar.gz" } ], "0.0.4.1": [ { "comment_text": "", "digests": { "md5": "f6ca1bb5ec39acc28ea136d64d922607", "sha256": "d37823401228031bf2b34ee7a69312220ce3292e517e517c33804d0ce7ac76b8" }, "downloads": -1, "filename": "commandify-0.0.4.1.tar.gz", "has_sig": false, "md5_digest": "f6ca1bb5ec39acc28ea136d64d922607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136106, "upload_time": "2015-05-14T09:57:38", "url": "https://files.pythonhosted.org/packages/cc/57/acc8099f4b044e036cdaa891684f2c5ce0f5eda3a7760306917a490ff04e/commandify-0.0.4.1.tar.gz" } ], "0.0.4.10": [ { "comment_text": "", "digests": { "md5": "404939a78915a36ab6d0b78f84eb61db", "sha256": "3dd3b8f84b3cd68610ee64597fbf03085b47e64631b5566a58cb89be425b83c7" }, "downloads": -1, "filename": "commandify-0.0.4.10-py2-none-any.whl", "has_sig": false, "md5_digest": "404939a78915a36ab6d0b78f84eb61db", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11265, "upload_time": "2015-05-31T18:14:04", "url": "https://files.pythonhosted.org/packages/78/8a/08eb341c2764564c1783cca82e91d0d5c17ecdf9370fa0846c823f565f1b/commandify-0.0.4.10-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b039992f229caaf50ee337991730e816", "sha256": "e2e17453c62e49017c2c734835746bbecaff1e12dff244e731445886963ecadf" }, "downloads": -1, "filename": "commandify-0.0.4.10.tar.gz", "has_sig": false, "md5_digest": "b039992f229caaf50ee337991730e816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138445, "upload_time": "2015-05-31T18:14:08", "url": "https://files.pythonhosted.org/packages/49/00/4a7f4ee0d78594a8102a3fc62e95b80290ab3b8a7dedc52295728d4fca90/commandify-0.0.4.10.tar.gz" } ], "0.0.4.2": [ { "comment_text": "", "digests": { "md5": "ea1b04c2c61f26a5c2099256c3f4f495", "sha256": "838a7932fdf1eb967318018fb953df9c2f02c12bcc41e5b6ac334ddbb126f5cf" }, "downloads": -1, "filename": "commandify-0.0.4.2.tar.gz", "has_sig": false, "md5_digest": "ea1b04c2c61f26a5c2099256c3f4f495", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136646, "upload_time": "2015-05-15T09:47:14", "url": "https://files.pythonhosted.org/packages/31/44/5b44c04fc26c9466d890a1e92cb028b21b8ca93eb5fc22f4232f6ddc2c0e/commandify-0.0.4.2.tar.gz" } ], "0.0.4.3": [ { "comment_text": "", "digests": { "md5": "bdd9db2e82565146b207b09a0f96423f", "sha256": "1e39b5914e218a7dbf9d7cb75133ff4af617def663d091f7d264e58aa5a51dee" }, "downloads": -1, "filename": "commandify-0.0.4.3.tar.gz", "has_sig": false, "md5_digest": "bdd9db2e82565146b207b09a0f96423f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137437, "upload_time": "2015-05-15T14:02:25", "url": "https://files.pythonhosted.org/packages/ef/ea/34bd68f8cb9dc38c8980542fc28800788b8f36baea5c601690e09538af1e/commandify-0.0.4.3.tar.gz" } ], "0.0.4.4": [ { "comment_text": "", "digests": { "md5": "fdeaaba996b807b674fd43db27f9f2bc", "sha256": "10c188a81fd0b42c0b2f3093d52c8018da3ac2841915dd6fa32f4d1ad07d6c23" }, "downloads": -1, "filename": "commandify-0.0.4.4.tar.gz", "has_sig": false, "md5_digest": "fdeaaba996b807b674fd43db27f9f2bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137400, "upload_time": "2015-05-15T14:09:30", "url": "https://files.pythonhosted.org/packages/d1/3c/6bd6178b10993f93fc357336cf2b87ac2ca7e1ac79a83240e49a4943811b/commandify-0.0.4.4.tar.gz" } ], "0.0.4.5": [ { "comment_text": "", "digests": { "md5": "90fa31dc37022befe0ca1b26cc273c2f", "sha256": "bd9a4af42cf982e7fd56af0715ff8417a5d6e2cab786bd45a4b0c4660795af6b" }, "downloads": -1, "filename": "commandify-0.0.4.5.tar.gz", "has_sig": false, "md5_digest": "90fa31dc37022befe0ca1b26cc273c2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 137739, "upload_time": "2015-05-17T12:18:37", "url": "https://files.pythonhosted.org/packages/fa/2c/46b324a0e76a61ad8c08832cd9e84adf720ac2698262e2fa3ebf9358ba8a/commandify-0.0.4.5.tar.gz" } ], "0.0.4.6": [ { "comment_text": "", "digests": { "md5": "16865ad39c68a4737323e8b336699868", "sha256": "bf850d108f4f518316decad72abe98ec3c06fcadddc34c63162c8f485fce30ae" }, "downloads": -1, "filename": "commandify-0.0.4.6-py2-none-any.whl", "has_sig": false, "md5_digest": "16865ad39c68a4737323e8b336699868", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11226, "upload_time": "2015-05-23T11:01:50", "url": "https://files.pythonhosted.org/packages/9d/ae/5cc6df17089c51d728cbe1c273cfb51702013cc490f6c6e5978dc7b6c91d/commandify-0.0.4.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c610b4bf1d7c7457a8da4e705cdf1b9c", "sha256": "e84cfd426ff9307401dd2fbce8a5fb70f650685222eb71c75a0e701cbaf0aea0" }, "downloads": -1, "filename": "commandify-0.0.4.6.tar.gz", "has_sig": false, "md5_digest": "c610b4bf1d7c7457a8da4e705cdf1b9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138434, "upload_time": "2015-05-23T11:01:54", "url": "https://files.pythonhosted.org/packages/b5/dc/1406791c757a4b5ce27a5ba9842243d5bfafff56da3da4a93f5686b763d0/commandify-0.0.4.6.tar.gz" } ], "0.0.4.7": [ { "comment_text": "", "digests": { "md5": "722ef6646c47e7e58eca610db04e7f10", "sha256": "a1bf909165dbb94e4b6b99cdd9306742be0777fd66b8570f2a910cc1ea45dd56" }, "downloads": -1, "filename": "commandify-0.0.4.7-py2-none-any.whl", "has_sig": false, "md5_digest": "722ef6646c47e7e58eca610db04e7f10", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11229, "upload_time": "2015-05-23T11:13:50", "url": "https://files.pythonhosted.org/packages/74/7c/842fb019eae92bbbf90dd51fc677142eca1aadc1c1e435ad120e09ad154d/commandify-0.0.4.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac913d6c6cc186809ba13fe720b7f214", "sha256": "61d712ed4c5f3e5882669dbe6c1d10d57028f3a4361c9695e9ef192935126c1e" }, "downloads": -1, "filename": "commandify-0.0.4.7.tar.gz", "has_sig": false, "md5_digest": "ac913d6c6cc186809ba13fe720b7f214", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138445, "upload_time": "2015-05-23T11:13:54", "url": "https://files.pythonhosted.org/packages/9b/28/2908cca843358c5efc559c42a7cc87b3aba876cda5ac9676370120a05689/commandify-0.0.4.7.tar.gz" } ], "0.0.4.8": [ { "comment_text": "", "digests": { "md5": "c20e87edacf0dbd4daa25461978c2acd", "sha256": "0dd13fd1b412682c055e63725f9be8fc7515e43b3724ad2461103c9c0cd0128e" }, "downloads": -1, "filename": "commandify-0.0.4.8-py2-none-any.whl", "has_sig": false, "md5_digest": "c20e87edacf0dbd4daa25461978c2acd", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11229, "upload_time": "2015-05-23T11:18:53", "url": "https://files.pythonhosted.org/packages/21/8c/2d4a7244ba328f37c2f4326a1f59663e9fec2fb052286fcd0fc2459efee3/commandify-0.0.4.8-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "76442154032da42f3890ca1fe7d96f15", "sha256": "2a091f650989036dbf866ac953a305725062283a6a1a929c5b7ca77e3c8b0024" }, "downloads": -1, "filename": "commandify-0.0.4.8.tar.gz", "has_sig": false, "md5_digest": "76442154032da42f3890ca1fe7d96f15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138423, "upload_time": "2015-05-23T11:18:57", "url": "https://files.pythonhosted.org/packages/1f/a7/0aa386c9cd27f72b20f5b9a1cb6b4514686daafb96b9c597392ca238dfaf/commandify-0.0.4.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "404939a78915a36ab6d0b78f84eb61db", "sha256": "3dd3b8f84b3cd68610ee64597fbf03085b47e64631b5566a58cb89be425b83c7" }, "downloads": -1, "filename": "commandify-0.0.4.10-py2-none-any.whl", "has_sig": false, "md5_digest": "404939a78915a36ab6d0b78f84eb61db", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11265, "upload_time": "2015-05-31T18:14:04", "url": "https://files.pythonhosted.org/packages/78/8a/08eb341c2764564c1783cca82e91d0d5c17ecdf9370fa0846c823f565f1b/commandify-0.0.4.10-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b039992f229caaf50ee337991730e816", "sha256": "e2e17453c62e49017c2c734835746bbecaff1e12dff244e731445886963ecadf" }, "downloads": -1, "filename": "commandify-0.0.4.10.tar.gz", "has_sig": false, "md5_digest": "b039992f229caaf50ee337991730e816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138445, "upload_time": "2015-05-31T18:14:08", "url": "https://files.pythonhosted.org/packages/49/00/4a7f4ee0d78594a8102a3fc62e95b80290ab3b8a7dedc52295728d4fca90/commandify-0.0.4.10.tar.gz" } ] }