{ "info": { "author": "Vyacheslav Rafalskiy", "author_email": "rafalskiy@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Tasker\r\n======\r\n\r\nTasker is a way to organize your scripts. If you have dozens of small scripts and you keep forgetting what they do and what parameters they take, **tasker** is for you. Instead of scripts you write functions, put them in a file or a couple of them, and then run the main tasker script giving them the task name and the parameters of the task like this:\r\n\r\n::\r\n\r\n run_task []...\r\n\r\nThe **help** task will scan your tasks package and give you the signatures and docstrings of your tasks.\r\n\r\nTo be considered as a task, the function name should end with ``_task``. The task name is the function name less the suffix. Suppose we have the following file stucture:\r\n\r\n::\r\n\r\n run_task\r\n tasks/\r\n __init__.py\r\n moretasks.py\r\n\r\n``__init__.py``\r\n\r\n.. code-block:: python\r\n\r\n def one_task(p1):\r\n print 'in one_task, parameters:', p1\r\n\r\n def two_task(p1, p2):\r\n print 'in two_task, parameters:', p1, p2\r\n\r\nand ``moretasks.py``\r\n\r\n.. code-block:: python\r\n\r\n def t1_task(p1):\r\n print 'in t1_task, parameters:', p1\r\n\r\n def t2_task(p1, p2=None):\r\n print 'in t2_task, parameters:', p1, p2\r\n\r\nThen we can run the following examples:\r\n\r\n::\r\n\r\n run_task one foo\r\n run_task two foo baz\r\n run_task two foo # fails, not enough parameters\r\n run_task moretasks.t1 spam\r\n run_task moretasks.t2 spam ham\r\n run_task moretasks.t2 spam # works too because of default value of the second parameter\r\n\r\nTo generate the ``run_task`` script in the current directory run:\r\n\r\n::\r\n\r\n python -m tasker # default = \"tasks\"\r\n\r\nIMPORTANT: All task parameters are strings.\r\n\r\nYou can include tasks with distribution of your project and run them all with a single installed script. Suppose your project looks like this:\r\n\r\n::\r\n\r\n someproject/\r\n __init__.py\r\n somestuff.py\r\n tasks/\r\n\r\nThen you can include the following snippet in ``__init__.py``:\r\n\r\n.. code-block:: python\r\n\r\n def run_task():\r\n import tasker\r\n tasker.main('tasks')\r\n\r\nthen include the following in your setuptools-based ``setup.py``:\r\n\r\n::\r\n\r\n entry_points={\r\n 'console_scripts': [\r\n 'someproject_task = someproject:run_task',\r\n ],\r\n }\r\n\r\nThis setup will create script ``someproject_task``, which will know about your tasks.\r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n pip install tasker\r\n\r\nOrigin\r\n------\r\n\r\nThis was inspired by the Ruby's ``rake`` utility. I used for some time the ``shovel``\r\npython clone of ``rake`` until I got dissatisfied with it. The important difference of ``tasker``\r\n(apart from simplicity) is that it does not depend on current working directory.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/s4g/tasker", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "tasker", "package_url": "https://pypi.org/project/tasker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tasker/", "project_urls": { "Homepage": "https://github.com/s4g/tasker" }, "release_url": "https://pypi.org/project/tasker/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Run functions as scripts", "version": "0.1.2" }, "last_serial": 2208302, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "814a598304fc2bd892aabe9489857498", "sha256": "26416632568db7e53cc3882ae4479b0108be2ddf12c8a6bb29939f75f220786f" }, "downloads": -1, "filename": "tasker-0.1.tar.gz", "has_sig": false, "md5_digest": "814a598304fc2bd892aabe9489857498", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4077, "upload_time": "2015-02-20T01:12:25", "url": "https://files.pythonhosted.org/packages/a7/45/11e2edb1067fa787a9dd9cb29088344c26d35d2e3150515182516142225e/tasker-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "3ce645920931c3dcdd13bf74c1cbce44", "sha256": "0e6e6afe3832449822939c3802d4b233021e53aa810f65db83a5cd3c0928301f" }, "downloads": -1, "filename": "tasker-0.1.zip", "has_sig": false, "md5_digest": "3ce645920931c3dcdd13bf74c1cbce44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4715, "upload_time": "2015-02-20T01:12:27", "url": "https://files.pythonhosted.org/packages/6f/cf/d25748a42629624396507aee0a9e7b6a265fba51331bebb7e5d3cd74fef2/tasker-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1e6885be73ecdb7bd22afedc6750e688", "sha256": "07346a11ff8bb76872f08ff61643afa4ea0a5c432a9b05bf5bff1a1ee41485bf" }, "downloads": -1, "filename": "tasker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1e6885be73ecdb7bd22afedc6750e688", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4403, "upload_time": "2015-02-21T01:16:00", "url": "https://files.pythonhosted.org/packages/b5/2b/421060434fd3142604e32f444941006d131bd56cd6446e2d265660529a02/tasker-0.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "272670a932e367c03335511b23b40c8f", "sha256": "596625070c99bbebbe3d46786e21d4169845b62dd0319ba600e3ac67753d79dd" }, "downloads": -1, "filename": "tasker-0.1.1.zip", "has_sig": false, "md5_digest": "272670a932e367c03335511b23b40c8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5935, "upload_time": "2015-02-21T01:16:02", "url": "https://files.pythonhosted.org/packages/80/15/eda5260b8d16022b0c73a0bf07670e3320d85fe7246ede5c128feda6abaf/tasker-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4bdee7be818aa5c7ab70f73a8573cc83", "sha256": "526a8b286c1e4855f455a239ae1a0c5ab81facce47d345018958d4a6d1d3a804" }, "downloads": -1, "filename": "tasker-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4bdee7be818aa5c7ab70f73a8573cc83", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5908, "upload_time": "2016-07-07T17:00:59", "url": "https://files.pythonhosted.org/packages/85/85/ba5f3f566d2f9a4db635fede9d09fa5e8d94daa7c17ef74ab6b65780e13e/tasker-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7368a322cadcd4946ce0313d5639a545", "sha256": "dfd2ec58e06a31e9e01613e7433415397d97f7589c8828087d7d1cd1b311ea0b" }, "downloads": -1, "filename": "tasker-0.1.2.zip", "has_sig": false, "md5_digest": "7368a322cadcd4946ce0313d5639a545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8319, "upload_time": "2016-07-07T17:01:03", "url": "https://files.pythonhosted.org/packages/48/25/3a127b833038d3b7ae6f26e91ed429fbfe34c9688c4e1a2d1623c432c332/tasker-0.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4bdee7be818aa5c7ab70f73a8573cc83", "sha256": "526a8b286c1e4855f455a239ae1a0c5ab81facce47d345018958d4a6d1d3a804" }, "downloads": -1, "filename": "tasker-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4bdee7be818aa5c7ab70f73a8573cc83", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5908, "upload_time": "2016-07-07T17:00:59", "url": "https://files.pythonhosted.org/packages/85/85/ba5f3f566d2f9a4db635fede9d09fa5e8d94daa7c17ef74ab6b65780e13e/tasker-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7368a322cadcd4946ce0313d5639a545", "sha256": "dfd2ec58e06a31e9e01613e7433415397d97f7589c8828087d7d1cd1b311ea0b" }, "downloads": -1, "filename": "tasker-0.1.2.zip", "has_sig": false, "md5_digest": "7368a322cadcd4946ce0313d5639a545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8319, "upload_time": "2016-07-07T17:01:03", "url": "https://files.pythonhosted.org/packages/48/25/3a127b833038d3b7ae6f26e91ed429fbfe34c9688c4e1a2d1623c432c332/tasker-0.1.2.zip" } ] }