{ "info": { "author": "Ram", "author_email": "vramak@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: AsyncIO", "Programming Language :: Python :: 3.5" ], "description": "asynctasks\n==========\n\n|BuildStatus| |Coverage|\n\nTask scheduler based on asyncio. Allows max-concurrency and granularity to be specified. Execution results are printed as a Gantt chart.\n\nSample Usage\n------------\n\n.. code-block:: python\n\n from asynctasks.executor import Executor\n from asynctasks.executionplan import ExecutionPlan\n import asyncio\n\n #create an array of tasks\n tasks_dict_array = [{\"dependencies\": [], \"name\": \"task0\"}, {\"dependencies\": [0], \"name\": \"task1\"},\n {\"dependencies\": [1], \"name\": \"task2\"}, {\"dependencies\": [0], \"name\": \"task3\"},\n {\"dependencies\": [], \"name\": \"task4\"}, {\"dependencies\": [], \"name\": \"task5\"}]\n\n #define an async function that should be executed for each task\n async def print_task(loop, task):\n print(\"Executing task {}\".format(task))\n await asyncio.sleep(0.1)\n\n #create an execution plan for the tasks\n plan = ExecutionPlan().from_dict_array(tasks_dict_array)\n print(\"\\nBEFORE EXECUTION\\n{}\".format(plan))\n\n #execute the plan with print_task function and max_concurrency as 2\n Executor(plan, 2, 0.01, print_task).trigger_execution()\n print(\"\\nAFTER EXECUTION\\n{}\".format(plan.as_gantt()))\n\nSample Output\n-------------\n\n.. code-block:: python\n\n BEFORE EXECUTION\n task0 Ready\n task1\n task2\n task3\n task4 Ready\n task5 Ready\n\n Executing task {'dependencies': [], 'name': 'task0', 'start_time': 1497528994.1246588}\n Executing task {'dependencies': [], 'name': 'task4', 'start_time': 1497528994.1246588}\n Executing task {'dependencies': [0], 'name': 'task1', 'start_time': 1497528994.236074}\n Executing task {'dependencies': [0], 'name': 'task3', 'start_time': 1497528994.2370954}\n Executing task {'dependencies': [1], 'name': 'task2', 'start_time': 1497528994.340769}\n Executing task {'dependencies': [], 'name': 'task5', 'start_time': 1497528994.3417716}\n\n AFTER EXECUTION\n ....................................................................................................\n task0 ...............................\n task1 .............................\n task2 ................................\n task3 .............................\n task4 ...............................\n task5 ...............................\n\n\n.. |BuildStatus| image:: https://travis-ci.org/vramakin/asynctasks.svg?branch=master\n :target: https://travis-ci.org/vramakin/asynctasks\n.. |Coverage| image:: https://coveralls.io/repos/github/vramakin/asynctasks/badge.svg?branch=master\n :target: https://coveralls.io/github/vramakin/asynctasks?branch=master", "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/vramakin/asynctasks", "keywords": "asyncio plan task scheduler async concurrent", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "asynctasks", "package_url": "https://pypi.org/project/asynctasks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/asynctasks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/vramakin/asynctasks" }, "release_url": "https://pypi.org/project/asynctasks/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Asynchronous task scheduler and runner for Python", "version": "0.1.4" }, "last_serial": 2952130, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4d0267fc44c5b1c6bb603cfb86901ece", "sha256": "6730bb5fc8a22b3fe16042dde1d9a78095457d57382baf8ef245583c86cc06b5" }, "downloads": -1, "filename": "asynctasks-0.1.zip", "has_sig": false, "md5_digest": "4d0267fc44c5b1c6bb603cfb86901ece", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4890, "upload_time": "2017-04-18T08:21:24", "url": "https://files.pythonhosted.org/packages/30/ac/5acfe50ff263346b203320dc81eefcbbdcf51e057c4fee4eb985abc151f1/asynctasks-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "607edaa0576f460886e51922390886bf", "sha256": "f5b1297714692cff9c7e0f42d40be24ae29ec4b1c77eb594708821924536fee0" }, "downloads": -1, "filename": "asynctasks-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "607edaa0576f460886e51922390886bf", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5326, "upload_time": "2017-04-25T08:43:57", "url": "https://files.pythonhosted.org/packages/5e/71/0dae10a0ef0b5187242a6740c6e693e48a573bcf548e208600dad2e66f5a/asynctasks-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8ae64cbbac0f1bd233a2e55fa1442bf", "sha256": "1226a461bf7cb67e95a629c1494f0f734621b6c65f24de905cee092a009fd2db" }, "downloads": -1, "filename": "asynctasks-0.1.1.zip", "has_sig": false, "md5_digest": "f8ae64cbbac0f1bd233a2e55fa1442bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5511, "upload_time": "2017-04-25T08:44:00", "url": "https://files.pythonhosted.org/packages/23/bf/d640d49532db7b62542fe5e873cf1e99bf25017c5f55f28fa99b526e123c/asynctasks-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "41f5bf83206beda4e5a5ddedf1ababed", "sha256": "7a299ec24794bb6e8cf3dd74654e6696f256d933a8016662a1b5abc60f42399c" }, "downloads": -1, "filename": "asynctasks-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "41f5bf83206beda4e5a5ddedf1ababed", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5323, "upload_time": "2017-06-15T12:43:46", "url": "https://files.pythonhosted.org/packages/10/ed/fd36702c5155cbbbef647dd3385a14c21f0609ffad016e49ff86ba4999c8/asynctasks-0.1.2-py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "98b1fd042a6f50e995f914a70a02f7ce", "sha256": "6ba679ed0f5c630940461ea80ceca12af7d3bf40cc993d31e044cc98140a45c8" }, "downloads": -1, "filename": "asynctasks-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "98b1fd042a6f50e995f914a70a02f7ce", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7068, "upload_time": "2017-06-15T12:57:57", "url": "https://files.pythonhosted.org/packages/c0/66/2f9f1785532b2e6c2c419c9cac9663a1310c5f7fc3993c78b4cfd91f37d6/asynctasks-0.1.3-py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "fbe6a0bb0d2dbfebc525aa65c148f26e", "sha256": "8f10a2cb323a4f7e7cabf05b2987ebdb7647991efec626c17a530a6f441c742c" }, "downloads": -1, "filename": "asynctasks-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "fbe6a0bb0d2dbfebc525aa65c148f26e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7078, "upload_time": "2017-06-15T13:02:16", "url": "https://files.pythonhosted.org/packages/2f/f7/974d6b73323efc90e117936c36ca68ed6017668aa6766c21b24ac90cb2c1/asynctasks-0.1.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fbe6a0bb0d2dbfebc525aa65c148f26e", "sha256": "8f10a2cb323a4f7e7cabf05b2987ebdb7647991efec626c17a530a6f441c742c" }, "downloads": -1, "filename": "asynctasks-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "fbe6a0bb0d2dbfebc525aa65c148f26e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7078, "upload_time": "2017-06-15T13:02:16", "url": "https://files.pythonhosted.org/packages/2f/f7/974d6b73323efc90e117936c36ca68ed6017668aa6766c21b24ac90cb2c1/asynctasks-0.1.4-py3-none-any.whl" } ] }