{ "info": { "author": "thautwarm", "author_email": "twshere@outlook.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "Wisepy\n======\n\nRTPY is an intuitive and effective CLI framework which is scalable and\npractical.\n\nThe most common use case might be an alternative of Python's\n``argparser``, also you can enrich your terminal commands by using\n``wisepy``.\n\nThe terminal utilities have been removed from ``wisepy``. One project,\none goal.\n\nInstall\n-------\n\n::\n\n pip install -U Redy rbnf wisepy\n\nUsage\n-----\n\n.. code:: python\n\n\n from wisepy.talking import Talking\n talking = Talking()\n\n @talking\n def add(left: 'an integer', right: 'another integer'):\n \"\"\"\n add up two numbers.\n \"\"\"\n left = int(left)\n right = int(right)\n return left + right\n\n if __name__ == '__main__':\n talking.on()\n\nAnd then use this python script:\n\n.. code:: shell\n\n cmd> python add --help # not only `cmd`, support all terminal as well.\n\n add\n add up two numbers.\n\n - left(positional or keyword arg) : an integer\n - right(positional or keyword arg) : another integer\n\n cmd> python demo.py add 1 2\n\n 3\n\nAnother example here shows that ``wisepy`` can translate python\nfunctions with any kinds of parameter signatures into terminal command.\n\n.. code:: python\n\n @talking.alias('sum')\n def another(*args,\n to_float: bool = False,\n double=None,\n additional_add: int = None):\n \"\"\"\n my sum command\n \"\"\"\n\n # using type annotation in keyword argument makes the argument\n # cast to the specific type.\n\n ret = sum(map(int, args))\n\n if double:\n ret = ret * 2\n\n if to_float:\n ret = float(ret)\n\n if additional_add:\n ret += additional_add\n\n return ret\n\nSee terminal:\n\n.. code:: shell\n\n cmd> python demo.py sum --help\n\n sum\n my sum command\n\n - args(*args)\n - to_float(keyword only) = False : \n - double(keyword only) = None\n - additional_add(keyword only) = None : \n\n cmd> python demo.py sum 1 2 3\n\n 6\n\n cmd> python demo.py sum 1 2 3 --double\n\n 12\n\n cmd> python demo.py sum 1 2 3 -additional_add 5 --double --to_float\n\n 17.0\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thautwarm/wisepy", "keywords": "CLI solution", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wisepy", "package_url": "https://pypi.org/project/wisepy/", "platform": "any", "project_url": "https://pypi.org/project/wisepy/", "project_urls": { "Homepage": "https://github.com/thautwarm/wisepy" }, "release_url": "https://pypi.org/project/wisepy/0.2.10/", "requires_dist": null, "requires_python": "", "summary": "effective and intuitive CLI framework", "version": "0.2.10" }, "last_serial": 4171631, "releases": { "0.2.10": [ { "comment_text": "", "digests": { "md5": "d0380b1e0d81dcfd21a47ed5b718a185", "sha256": "e5a8ddb9f34a086ac5d636abce3db13238dce9794157d5ad8483f8b21b6e2349" }, "downloads": -1, "filename": "wisepy-0.2.10-py3-none-any.whl", "has_sig": false, "md5_digest": "d0380b1e0d81dcfd21a47ed5b718a185", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8071, "upload_time": "2018-08-15T03:42:20", "url": "https://files.pythonhosted.org/packages/70/2d/a8dad34233af19d5f13e264b635474a85d26fffd2b3db91bd096d9bd228b/wisepy-0.2.10-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d0380b1e0d81dcfd21a47ed5b718a185", "sha256": "e5a8ddb9f34a086ac5d636abce3db13238dce9794157d5ad8483f8b21b6e2349" }, "downloads": -1, "filename": "wisepy-0.2.10-py3-none-any.whl", "has_sig": false, "md5_digest": "d0380b1e0d81dcfd21a47ed5b718a185", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 8071, "upload_time": "2018-08-15T03:42:20", "url": "https://files.pythonhosted.org/packages/70/2d/a8dad34233af19d5f13e264b635474a85d26fffd2b3db91bd096d9bd228b/wisepy-0.2.10-py3-none-any.whl" } ] }