{ "info": { "author": "Mr-Io", "author_email": "macrigaud@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": ".. The Readme should be the single most important document in your codebase; writing it first is the proper thing to do.\n * screenshots logo/demo etc..\n * api reference (documentation)\n * how to contribute to it and credits\n\nCmdfunctools: command line tools from python functions\n======================================================\n|Version| |License| |Python| |Contributors|\n\n.. |Version| image:: https://img.shields.io/pypi/v/cmdfunctools.svg\n :target: https://pypi.org/project/cmdfunctools/\n\n.. |License| image:: https://img.shields.io/github/license/Mr-Io/cmdfunctools.svg\n :target: https://pypi.org/project/cmdfunctools/\n\n.. |Python| image:: https://img.shields.io/pypi/pyversions/cmdfunctools.svg\n :target: https://pypi.org/project/cmdfunctools/\n\n.. |Contributors| image:: https://img.shields.io/github/contributors-anon/Mr-Io/cmdfunctools.svg\n :target: https://pypi.org/project/cmdfunctools/\n\nWhen developing a new package, there are python functions that\nyou want to make also available from the command line.\nTo do so, an additional function is needed; a specially designed command-line-function\nwhich is then referenced in the setup.py file, inside the `entry_points` key.\nThis command-line-function is special indeed, since\nit cannot have arguments (it uses instead `sys.stdin` or `sys.argv` as inputs) and\ncannot have return values (it uses instead `print()` as output).\n\n**With cmdfunctools you can automatically create a command-line-function from any python function.**\n\nInstallation\n------------\nThe source code can be downloaded from GitHub, where the code is `always available`_.\n\nIt can also be installed from PyPI running::\n\n $ pip install cmdfunctools\n\n\nUsage\n-----\nTo create a command-line-function use the `comand_func` decorator::\n\n from cmdfunctools import command_func\n\n @command_func(itype='int', otype='int')\n def add(a, b)\n res = a + b\n return res\n\nNow the function can be referenced **as is** in `entry_points` inside setup.py and,\nafter the package installation, it can be used from the command line interface::\n\n $ add 3 2\n 5\n\nThe original function can still be used within python code using the __wrapped__() method::\n\n >>> add.__wrapped__(3, 2)\n 5\n\nFeatures\n--------\n* Automatic number of arguments check\n* Automatic argument type check\n* Optional argument length check (equal or less-or-equal)\n* Pipelines supported\n* I/O argument types supported:\n\n * integer\n * hexadecimal\n\n**The project is in** `3-Alpha`_ **development status, new features will be added before 5-Production/Stable.**\n\n.. _`always available`: https://github.com/Mr-Io/cmdfunctools.git\n.. _`3-Alpha`: https://pypi.org/project/cmdfunctools/\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/cmdfunctions", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cmdfunctools", "package_url": "https://pypi.org/project/cmdfunctools/", "platform": "", "project_url": "https://pypi.org/project/cmdfunctools/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/cmdfunctions" }, "release_url": "https://pypi.org/project/cmdfunctools/0.0.3/", "requires_dist": null, "requires_python": ">=3.7, <4", "summary": "make python functions usable from command line", "version": "0.0.3" }, "last_serial": 5177876, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "b8b9ef4cd83f8924f2df4eef7aa310a1", "sha256": "1f925e40d02bb65e8e8b38371ef6293c740e5f5964a8ce6af3ecea3f3487c0dc" }, "downloads": -1, "filename": "cmdfunctools-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b8b9ef4cd83f8924f2df4eef7aa310a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7, <4", "size": 6336, "upload_time": "2019-04-23T14:52:00", "url": "https://files.pythonhosted.org/packages/ae/36/8c93ab5249ba53fddad1c7782bef5336180b63dea66d34be7f13b7729aad/cmdfunctools-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "720386502590e7a4c87ee5c7bced361b", "sha256": "546627334ce4fe596cd56b83da49905b5855c08f19f308e40bee5d6a6e6e8d09" }, "downloads": -1, "filename": "cmdfunctools-0.0.3.tar.gz", "has_sig": false, "md5_digest": "720386502590e7a4c87ee5c7bced361b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5941, "upload_time": "2019-04-23T14:52:01", "url": "https://files.pythonhosted.org/packages/eb/cd/de474f3d7d21fe5e650164787e64b481711ba091c3c89da48576961d67c7/cmdfunctools-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8b9ef4cd83f8924f2df4eef7aa310a1", "sha256": "1f925e40d02bb65e8e8b38371ef6293c740e5f5964a8ce6af3ecea3f3487c0dc" }, "downloads": -1, "filename": "cmdfunctools-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b8b9ef4cd83f8924f2df4eef7aa310a1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7, <4", "size": 6336, "upload_time": "2019-04-23T14:52:00", "url": "https://files.pythonhosted.org/packages/ae/36/8c93ab5249ba53fddad1c7782bef5336180b63dea66d34be7f13b7729aad/cmdfunctools-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "720386502590e7a4c87ee5c7bced361b", "sha256": "546627334ce4fe596cd56b83da49905b5855c08f19f308e40bee5d6a6e6e8d09" }, "downloads": -1, "filename": "cmdfunctools-0.0.3.tar.gz", "has_sig": false, "md5_digest": "720386502590e7a4c87ee5c7bced361b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5941, "upload_time": "2019-04-23T14:52:01", "url": "https://files.pythonhosted.org/packages/eb/cd/de474f3d7d21fe5e650164787e64b481711ba091c3c89da48576961d67c7/cmdfunctools-0.0.3.tar.gz" } ] }