{ "info": { "author": "Laufire Technologies", "author_email": "laufiretechnologies@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development", "Topic :: Utilities" ], "description": "The intenetion\r\n---------------\r\nec - intends to reduce the learning curve needed to expose functionality via the command line. With available options like `argparse `_ and `docopt `_, it might take several hours to get them right. And there is also the issue of the needed amount of extra coding to setup and process the arguments. See the following example to see how `ec `_ solves the issue.\r\n\r\nA simple example\r\n----------------\r\n.. code:: python\r\n\r\n\tfrom ec.ec import task\r\n\r\n\t@task\r\n\tdef say_hello():\r\n\t\tprint 'Hello, world!'\r\n\r\ncould be accessed from the command line, like:\r\n\r\n.. code:: bash\r\n\r\n\t$ python hello.py say_hello\r\n\t\tHello, world!\r\n\r\nFeatures\r\n--------\r\n\r\n* Typed arguments.\r\n\r\n* Sub commands (like git).\r\n\r\n* Custom types.\r\n\r\n* Shell mode (like python's interactive mode).\r\n\r\n* Named / Positional arguments.\r\n\r\nA more complete example\r\n-----------------------\r\nfrom: `simple.py `_\r\n\r\n.. code:: python\r\n\r\n\tfrom ec.ec import task, arg, group\r\n\r\n\t@task # define a task\r\n\t@arg(type=int, desc= 'Value for arg1') # add an argument with a type and a description\r\n\t@arg(type=int)\r\n\tdef task1(arg1, arg2=1):\r\n\t\tprint arg1, arg2\r\n\r\n\t@group(desc = 'A group with some tasks') # define a group\r\n\tclass group1:\r\n\t\t@task\r\n\t\tdef task1(arg1): # define a task inside the group\r\n\t\t\tprint arg1 + arg1\r\n\r\n**Execute a task:** **\r\n\r\nFrom the command-line enter\r\n\r\n.. code:: bash\r\n\r\n\t$ python simple.py task1 arg1=1 arg2=2\r\n\t\t1 2\r\n\r\n\t$ python simple.py group1/task1 arg1=1\r\n\t\t2\r\n\r\n\t$ python simple.py group1/task1 1 # positional arguments too are supported\r\n\t\t2\r\n\r\n**Interactively execute tasks:** **\r\n\r\nFrom the command-line enter\r\n\r\n.. code:: bash\r\n\r\n\t$ python simple.py # this will enter into ec-shell\r\n\r\n\t>task1\r\n\tValue for arg1: 1\r\n\targ2 (1): 2\r\n\t1 2\r\n\r\n\t>group1/task1 # execute task1 under group1\r\n\targ1: 1\r\n\t11\r\n\r\n\t>task1 arg1=1 # arguments can be given while calling the task, the missing arguments will be collected from the user\r\n\targ2 (1): 2\r\n\t1 2\r\n\r\n\t>^Z # exit the shell\r\n\r\n**Utilizing STDIN:**\r\n\r\nFrom the command-line enter\r\n\r\n.. code:: bash\r\n\r\n\t$ echo 1 2 | xargs python simple.py task1 # Dispatch a command with args passed through STDIN and converted to args using xargs.\r\n\t$ echo -e \"1\\n2\" | python simple.py -p task1 # Dispatch a command and with partial args and pass the rest through STDIN.\r\n\t$ echo task1 1 2 | python simple.py # Feeding the shell with complete commands through stdin.\r\n\r\nDetailed docs could be found at `PyDocs `_.\r\n\r\nFor more examples check the `github `_ page.\r\n\r\n\r\n", "description_content_type": "", "docs_url": "https://pythonhosted.org/ec/", "download_url": "https://pypi.python.org/pypi/ec", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Laufire/ec", "keywords": "ec command line cli interactive launch argument script dir shell dispatch decorator task arg group sub-commands type custom-type", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ec", "package_url": "https://pypi.org/project/ec/", "platform": "any", "project_url": "https://pypi.org/project/ec/", "project_urls": { "Download": "https://pypi.python.org/pypi/ec", "Homepage": "https://github.com/Laufire/ec" }, "release_url": "https://pypi.org/project/ec/0.2.5/", "requires_dist": null, "requires_python": "", "summary": "ec - a cli interface for python modules.", "version": "0.2.5" }, "last_serial": 4529157, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2094d6c8ff9be64e9674110dd35d0204", "sha256": "0d1c8b991059780fec4eed367c49d3dd351f18662ca47624d874607154a2be61" }, "downloads": -1, "filename": "ec-0.1.0.zip", "has_sig": false, "md5_digest": "2094d6c8ff9be64e9674110dd35d0204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31479, "upload_time": "2015-07-02T12:03:41", "url": "https://files.pythonhosted.org/packages/16/56/739a4bae9e5cb494d2fb2e371178a6472ff33cf756dd5068461cb7cee384/ec-0.1.0.zip" } ], "0.1.1": [], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1e2d6840b3df87e6ab414a2ff971bcbf", "sha256": "89ada979a9f02f521b89355d438c1d7d75e499a3e84e12eda90c0d50ee705267" }, "downloads": -1, "filename": "ec-0.1.2.zip", "has_sig": false, "md5_digest": "1e2d6840b3df87e6ab414a2ff971bcbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34551, "upload_time": "2015-07-05T22:06:29", "url": "https://files.pythonhosted.org/packages/83/4e/d4a2b1d2ed2de751ff9d242685483e5c47dc84b2de8ad6a7db72c87ef87f/ec-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ec28e6de1eb94c103a582f878b02a9e9", "sha256": "bfc06aa385514485ec94e0217306012b5534b2bdae7780cf742592df1b7e31f4" }, "downloads": -1, "filename": "ec-0.1.3.zip", "has_sig": false, "md5_digest": "ec28e6de1eb94c103a582f878b02a9e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33986, "upload_time": "2015-07-08T15:33:01", "url": "https://files.pythonhosted.org/packages/ee/c5/71d2ead187e8e0633a68a4371fb69701e4cb81961057c6134b766b205119/ec-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e75677ac39f21179af6d00567a54a9b9", "sha256": "0f9cc53151f8ab4b1f971a18651accdbab1ceff4a9502c27b1c50e73da8a6ee6" }, "downloads": -1, "filename": "ec-0.1.4.zip", "has_sig": false, "md5_digest": "e75677ac39f21179af6d00567a54a9b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35458, "upload_time": "2015-07-09T01:15:26", "url": "https://files.pythonhosted.org/packages/e5/76/bb099ea80a29db9c501eb9fff8cf8973992a15f0cc48f5f8ffc798d4884d/ec-0.1.4.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "cd7f3231f0c5abf05589bbda2d477b82", "sha256": "a4b2e9fbdfcfa0214deac407e6bbefab8dc9aecb51bb0958df5d78b7384543a4" }, "downloads": -1, "filename": "ec-0.2.0.zip", "has_sig": false, "md5_digest": "cd7f3231f0c5abf05589bbda2d477b82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 82912, "upload_time": "2015-07-18T20:39:22", "url": "https://files.pythonhosted.org/packages/6b/ff/f99de33991dbbc52071d97d0013d1dc6d2d4c5c318eee08e0fe9503b2158/ec-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ecde7f9913bd0072ea30eafc10f4c5cc", "sha256": "0c807eaae589459c4d53d001fa0026887a1567fdd9dd2f71352b1d892675833e" }, "downloads": -1, "filename": "ec-0.2.1.zip", "has_sig": false, "md5_digest": "ecde7f9913bd0072ea30eafc10f4c5cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88111, "upload_time": "2015-07-26T01:33:53", "url": "https://files.pythonhosted.org/packages/92/5e/2a629d833132c807914c9e6ddfe7afeab435070f14f65e12be2939e37813/ec-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "51332dacbc26cd2946aaab0ead72c36a", "sha256": "2c6bd87faf928457db595fa60967f03ac305603910e48207d087b35c586d280d" }, "downloads": -1, "filename": "ec-0.2.2.zip", "has_sig": false, "md5_digest": "51332dacbc26cd2946aaab0ead72c36a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 90856, "upload_time": "2015-07-28T11:11:50", "url": "https://files.pythonhosted.org/packages/51/20/d87ce32d5deb34f0663ad0c18a2ddac3cda1ba900c11a329fbc0a846004d/ec-0.2.2.zip" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "cea8cfba2f13f46c1eb2ae97e53086e3", "sha256": "f95a73c5dc3cd11c5522c3acf6946e96af5931980bdb5a7aa72bdc2a51eafe59" }, "downloads": -1, "filename": "ec-0.2.3.zip", "has_sig": false, "md5_digest": "cea8cfba2f13f46c1eb2ae97e53086e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 118211, "upload_time": "2015-08-06T10:27:35", "url": "https://files.pythonhosted.org/packages/ad/1d/b0bfde27b11e1fa47f609325890d4dbb14525924c1db9175beead728dccc/ec-0.2.3.zip" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "8b74bc69e4b0872efc98932df964787d", "sha256": "818464dd45c78d1d4e3da5a3eadc4e47f036c4c624e65dc3eec92d8234af1036" }, "downloads": -1, "filename": "ec-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8b74bc69e4b0872efc98932df964787d", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 24900, "upload_time": "2015-09-14T16:51:55", "url": "https://files.pythonhosted.org/packages/ac/61/03c37ee703f3f6b9072a4c56340cb1287df62fd3dcc622a4dad15b11f6f2/ec-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "95543e32e82b10339d0a997f25482692", "sha256": "868dc60b80d0955ad2fcd4fc4239e48c2136ded8dbb83062f7d3866d14f26186" }, "downloads": -1, "filename": "ec-0.2.4.zip", "has_sig": false, "md5_digest": "95543e32e82b10339d0a997f25482692", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 280838, "upload_time": "2015-09-14T14:30:19", "url": "https://files.pythonhosted.org/packages/d1/65/bb737620a77ecd8323e5ad07d51c3e271d36126e0512c05c4652376c072a/ec-0.2.4.zip" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "2931d15bdb17b2c7ee07537d3b36e966", "sha256": "ff3cb93c0af77506ad3d5dfb91732cbde3971e4d69a73bd66b70d2e5afebb959" }, "downloads": -1, "filename": "ec-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2931d15bdb17b2c7ee07537d3b36e966", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26401, "upload_time": "2018-11-26T10:48:08", "url": "https://files.pythonhosted.org/packages/20/9e/4d4a8d1e4274aeebd75c262a5e3917333cd6f9d3deb489ec6ccf679672a9/ec-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "427060ca8a59d489d318deb8c0858282", "sha256": "7f2e139b30ed6e97c6d651fb0d2d37a0c167c0ac2b355b4de366e35d9b88f839" }, "downloads": -1, "filename": "ec-0.2.5.tar.gz", "has_sig": false, "md5_digest": "427060ca8a59d489d318deb8c0858282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39303, "upload_time": "2018-11-26T10:48:11", "url": "https://files.pythonhosted.org/packages/1e/70/1073ffed8ac9126a30afbaba3074ac69ee6c63e19974f7ad7f8657a7ac54/ec-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2931d15bdb17b2c7ee07537d3b36e966", "sha256": "ff3cb93c0af77506ad3d5dfb91732cbde3971e4d69a73bd66b70d2e5afebb959" }, "downloads": -1, "filename": "ec-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2931d15bdb17b2c7ee07537d3b36e966", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26401, "upload_time": "2018-11-26T10:48:08", "url": "https://files.pythonhosted.org/packages/20/9e/4d4a8d1e4274aeebd75c262a5e3917333cd6f9d3deb489ec6ccf679672a9/ec-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "427060ca8a59d489d318deb8c0858282", "sha256": "7f2e139b30ed6e97c6d651fb0d2d37a0c167c0ac2b355b4de366e35d9b88f839" }, "downloads": -1, "filename": "ec-0.2.5.tar.gz", "has_sig": false, "md5_digest": "427060ca8a59d489d318deb8c0858282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39303, "upload_time": "2018-11-26T10:48:11", "url": "https://files.pythonhosted.org/packages/1e/70/1073ffed8ac9126a30afbaba3074ac69ee6c63e19974f7ad7f8657a7ac54/ec-0.2.5.tar.gz" } ] }