{ "info": { "author": "rcmerci", "author_email": "562837353@qq.com", "bugtrack_url": null, "classifiers": [], "description": "\n Example\n\n #test.py\n from pytasks import App\n from datetime import datetime as dt\n from datetime import timedelta as td\n class T:\n def __init__(self, taskid):\n self.times = 10 #<--------------the largest number of this task will be executed\n self.now = dt.now()\n self.every = td(seconds=4) #<------frequency of task being polled\n self.taskid = taskid\n def __call__(self): #<--------------content of task\n print self.taskid, \":\", dt.now()-self.now\n self.now =dt.now()\n def schedule(self): #<--------------task'schedule\uff1a\n return dt.now()+td(seconds=2) #return bool() or datetime.datetime(...)[means the time to run task]\n task1 = T(1) \n task2 = T(2)\n #set task2's schedule\n task2.schedule = lambda: True if os.environ['LOGNAME']=='root' else False\n app = App()\n app.add(task1)\n app.add(task2\n app.run()\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pytasks", "package_url": "https://pypi.org/project/pytasks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytasks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/pytasks/1.3/", "requires_dist": null, "requires_python": null, "summary": "work on time-triggered or event-triggered tasks", "version": "1.3" }, "last_serial": 1208126, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "6d7476f03f607d44e629cc4a2fcef89b", "sha256": "9af9fd1863ca08dc68ce5b45010dd20f0958228bc0aafe11a2271d9e030996f5" }, "downloads": -1, "filename": "pytasks-1.0.tar.gz", "has_sig": false, "md5_digest": "6d7476f03f607d44e629cc4a2fcef89b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4662, "upload_time": "2014-08-27T07:08:34", "url": "https://files.pythonhosted.org/packages/04/ef/86efa255e916e4748a3a838b65becf693513130eb6732099bede289f7a14/pytasks-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "a04449c228d5cc34b82baadf98944b91", "sha256": "1784512f7e18ed63b1121b8f14bc657b7bea909d7dab06233cf5843a2f23c423" }, "downloads": -1, "filename": "pytasks-1.1.tar.gz", "has_sig": false, "md5_digest": "a04449c228d5cc34b82baadf98944b91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4744, "upload_time": "2014-08-27T07:25:14", "url": "https://files.pythonhosted.org/packages/c9/ca/f9739a58a21c10ad2806c0213629b16a139ad87629b4f04ae007cd5800dd/pytasks-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "7498edfed4bae45e1876f119f31447a7", "sha256": "1493636f6c8196a1524e929fd0cff67f3898709621c386a912b4a84099e86c6d" }, "downloads": -1, "filename": "pytasks-1.2.tar.gz", "has_sig": false, "md5_digest": "7498edfed4bae45e1876f119f31447a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4881, "upload_time": "2014-08-30T14:18:48", "url": "https://files.pythonhosted.org/packages/90/2c/143f944ca8859d4de48e6cc53a0dedb562c024e3cb73fa72b87f227e568f/pytasks-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "6d93c9a7a4b32eb226b7b182afaa47e6", "sha256": "3fb0cd97557eacbe2e5a336a8921356de2d3a19250146d4a0e6f331c8e6c07e4" }, "downloads": -1, "filename": "pytasks-1.3.tar.gz", "has_sig": false, "md5_digest": "6d93c9a7a4b32eb226b7b182afaa47e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5480, "upload_time": "2014-08-31T10:34:49", "url": "https://files.pythonhosted.org/packages/ad/58/b883489c1bfc565a69cac34bf762fec61c2cd65cdc5ada718077fc395da3/pytasks-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6d93c9a7a4b32eb226b7b182afaa47e6", "sha256": "3fb0cd97557eacbe2e5a336a8921356de2d3a19250146d4a0e6f331c8e6c07e4" }, "downloads": -1, "filename": "pytasks-1.3.tar.gz", "has_sig": false, "md5_digest": "6d93c9a7a4b32eb226b7b182afaa47e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5480, "upload_time": "2014-08-31T10:34:49", "url": "https://files.pythonhosted.org/packages/ad/58/b883489c1bfc565a69cac34bf762fec61c2cd65cdc5ada718077fc395da3/pytasks-1.3.tar.gz" } ] }