{ "info": { "author": "VRT Systems", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "pyat\r\n====\r\n\r\n.. image:: https://travis-ci.org/vrtsystems/pyat.svg?branch=master\r\n :target: https://travis-ci.org/vrtsystems/pyat\r\n.. image:: https://coveralls.io/repos/vrtsystems/pyat/badge.svg?branch=master&service=github\r\n :target: https://coveralls.io/github/vrtsystems/pyat?branch=master\r\n\r\n`pyat` is the Python analogue of the Unix `at` daemon, it runs tasks at\r\nspecified times, optionally providing a means to pass around results and\r\nexceptions.\r\n\r\nThe interface is intended to be able to support a variety of usage scenarios\r\nincluding synchronous applications with a main loop, sporadically called\r\nfunctions, multithreadded/multiprocessing based code and asynchronous frameworks\r\nlike Twisted or Tornado.\r\n\r\nREQUIREMENTS\r\n============\r\n\r\n- `six`_\r\n\r\nTYPICAL USAGE\r\n=============\r\n\r\n::\r\n\r\n import pyat.sync\r\n import time\r\n\r\n scheduler = pyat.sync.SynchronousScheduler()\r\n\r\n # ... etc ...\r\n\r\n background_task = None\r\n\r\n while True:\r\n # ... etc ...\r\n\r\n scheduler.poll()\r\n\r\n if foo == bar:\r\n # Do something in 10 seconds.\r\n background_task = scheduler.schedule(\r\n time.time() + 10, my_task, arg1, arg2, kwarg1=arg3)\r\n\r\n elif foo == baz:\r\n # Cancel task\r\n background_task.cancel()\r\n background_task = None\r\n\r\n elif (foo == quux) and (background_task is not None):\r\n # Check back on background task\r\n try:\r\n result = background_task.result\r\n # do something with result\r\n background_task = None\r\n except pyat.sync.NotExecutedYet:\r\n # A bit too early\r\n pass\r\n\r\nSTATUS\r\n======\r\n\r\n- Synchronous implementation `pyat.sync` works.\r\n\r\n.. _`six`: https://pythonhosted.org/six/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vrtsystems/pyat", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyat", "package_url": "https://pypi.org/project/pyat/", "platform": "", "project_url": "https://pypi.org/project/pyat/", "project_urls": { "Homepage": "https://github.com/vrtsystems/pyat" }, "release_url": "https://pypi.org/project/pyat/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Python scheduling library", "version": "0.0.1" }, "last_serial": 3859483, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f16d1eb794435972bfe3caefb33e55f9", "sha256": "9ca31e6f319cacdf0c4dedf50d091d7166d6ead46aca1413147244d2acb99007" }, "downloads": -1, "filename": "pyat-0.0.1.tar.gz", "has_sig": true, "md5_digest": "f16d1eb794435972bfe3caefb33e55f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5654, "upload_time": "2016-02-04T08:58:47", "url": "https://files.pythonhosted.org/packages/26/1a/e62dce3bdab02208f07222e54246206cb69f984f9f9309c7ae3e3a034008/pyat-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f16d1eb794435972bfe3caefb33e55f9", "sha256": "9ca31e6f319cacdf0c4dedf50d091d7166d6ead46aca1413147244d2acb99007" }, "downloads": -1, "filename": "pyat-0.0.1.tar.gz", "has_sig": true, "md5_digest": "f16d1eb794435972bfe3caefb33e55f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5654, "upload_time": "2016-02-04T08:58:47", "url": "https://files.pythonhosted.org/packages/26/1a/e62dce3bdab02208f07222e54246206cb69f984f9f9309c7ae3e3a034008/pyat-0.0.1.tar.gz" } ] }