{ "info": { "author": "Mikhail Korobov", "author_email": "kmike84@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "==============\nFabric-taskset\n==============\n\n`Fabric `_ has class-based tasks but they are\nlimited: Task class represents a single task.\n\nThis module make it possible to have class-based Fabric task sets.\n\nInstallation\n------------\n\n::\n\n pip install fabric-taskset\n\nUsage\n-----\n\n``TaskSet`` is a class that can expose its methods as Fabric tasks.\n\nExample::\n\n\n # fabfile.py\n from fabric.api import local\n from taskset import TaskSet, task_method\n\n class SayBase(TaskSet):\n def say(self, what):\n raise NotImplementedError()\n\n @task_method(default=True, alias='hi')\n def hello(self):\n self.say('hello')\n\n @task_method\n def bye(self):\n self.say('goodbye')\n\n class EchoSay(SayBase):\n def say(self, what):\n local('echo ' + what)\n\n say = EchoSay().expose_as_module('say')\n\n\nand then::\n\n $ fab -l\n Available commands:\n\n say\n say.bye\n say.hello\n say.hi\n\n $ fab say.hi\n hello\n\n\n``taskset.task_method`` is a decorator declaring the wrapped method to be task.\nIt acceps the same arguments as ``fabric.decorators.task`` so\nuse it on methods just like fabric's decorator is used on functions.\n\nYou can also create an \"on-disk\" Python module and populate it with tasks::\n\n # my_lib/say.py\n from taskset import TaskSet, task_method\n\n class SayBase(TaskSet):\n def say(self, what):\n raise NotImplementedError()\n\n @task_method(default=True, alias='hi')\n def hello(self):\n self.say('hello')\n\n class EchoSay(SayBase):\n def say(self, what):\n local('echo ' + what)\n\n instance = EchoSay()\n instance.expose_to_current_module()\n\n # fabfile.py\n from mylib import say\n\n\n\nAcknowledgements\n----------------\n\nhttps://github.com/ramusus/fabriclassed is a very similar app.\nAt the time of writing it is focused on old-style Fabric tasks\nand has a small deployment framework included.\n\nIn order to feed my NIH syndrome I create Fabric-taskset which\nexposes new-style Fabric tasks, provides slightly different API and doesn't\nhave extra goodies.\n\nThis library then evolved to support exposing tasks without creating dummy\non-disk modules (thanks to Denis Untevskiy).\n\nChanges\n=======\n\n0.2.1 (2012-09-21)\n------------------\n\n- private ``_expose_to`` method now returns list, not generator.\n\n0.2 (2012-08-28)\n----------------\n\n- ``@task`` decorator is deprecated and replaced with ``@task_method``.\n This was a bad name because of ``@fabric.task`` decorator\n (thanks Denis Untevskiy);\n- ``Taskset.expose_as_module`` method that allows to use TaskSet instances\n from command line without creating dummy modules on disk\n (thanks Denis Untevskiy).\n\n\n0.1 (2012-03-03)\n----------------\n\nInitial release.", "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/kmike/fabric-taskset/", "keywords": null, "license": "MIT license", "maintainer": null, "maintainer_email": null, "name": "fabric-taskset", "package_url": "https://pypi.org/project/fabric-taskset/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fabric-taskset/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kmike/fabric-taskset/" }, "release_url": "https://pypi.org/project/fabric-taskset/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Expose class members as Fabric tasks", "version": "0.2.1" }, "last_serial": 654770, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e696ababf534320a1f8ed1fe61d7b133", "sha256": "715d87269df7b65ab8511424c42ceaf8a707a8545837645c5f4c6d5c056196a7" }, "downloads": -1, "filename": "fabric-taskset-0.1.tar.gz", "has_sig": false, "md5_digest": "e696ababf534320a1f8ed1fe61d7b133", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3342, "upload_time": "2012-03-03T01:04:53", "url": "https://files.pythonhosted.org/packages/96/88/62af2805b242e7a751f042bc2b9b8d53c2545f7dcadb46996387a1292aef/fabric-taskset-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "97fdc2b9ff9f0bf24f53a772cc2f22e5", "sha256": "86f443e98be734af3bf292d7975fb57bc6d0953e00ae3402ff29cfea73d7ea30" }, "downloads": -1, "filename": "fabric-taskset-0.2.tar.gz", "has_sig": false, "md5_digest": "97fdc2b9ff9f0bf24f53a772cc2f22e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4119, "upload_time": "2012-08-28T14:35:14", "url": "https://files.pythonhosted.org/packages/4b/91/b9a54f5aebf4a11f7695d586f513f73586b801559a5b5e61ea167713288f/fabric-taskset-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f1b5d1f780b8eb52e24abf1f7c0ca4c2", "sha256": "ead6bd24f081cffe5950eda4a3d2b48a65affbee7627557f4e5450aa1b628025" }, "downloads": -1, "filename": "fabric-taskset-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f1b5d1f780b8eb52e24abf1f7c0ca4c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4249, "upload_time": "2012-09-21T09:24:33", "url": "https://files.pythonhosted.org/packages/1f/ca/f9551cb12fd3ca7ef36f131cc7f4fe4fcec9b0e574dfb37b6721a357be2a/fabric-taskset-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f1b5d1f780b8eb52e24abf1f7c0ca4c2", "sha256": "ead6bd24f081cffe5950eda4a3d2b48a65affbee7627557f4e5450aa1b628025" }, "downloads": -1, "filename": "fabric-taskset-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f1b5d1f780b8eb52e24abf1f7c0ca4c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4249, "upload_time": "2012-09-21T09:24:33", "url": "https://files.pythonhosted.org/packages/1f/ca/f9551cb12fd3ca7ef36f131cc7f4fe4fcec9b0e574dfb37b6721a357be2a/fabric-taskset-0.2.1.tar.gz" } ] }