{ "info": { "author": "Jeremiah Dodds", "author_email": "jeremiah.dodds@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Recurring\n[![Build Status](https://travis-ci.org/jdodds/recurring.svg?branch=master)](https://travis-ci.org/jdodds/recurring) [![Coverage Status](https://coveralls.io/repos/github/jdodds/recurring/badge.svg?branch=master)](https://coveralls.io/github/jdodds/recurring?branch=master) [![Documentation Status](https://readthedocs.org/projects/recurring/badge/?version=latest)](https://recurring.readthedocs.io/en/latest/?badge=latest)\n\n\nThis is a simple library for running a function or callable every N seconds. It's meant for applications that need to schedule small, self-contined callable(s) on a relatively long, potentially changing period . alive-checks, state snapshots, that sort of thing.\n\n## Use this if:\n+ You want to call something periodically over the lifetime of your application.\n+ You want to be able to change the time between calls.\n+ You want or need to avoid the overhead of `join`ing and `start`ing a thread every time. (up to 1/5 of a second according to my sample-size of one machine under no other load)\n+ The stuff you're going to call isn't going to destroy machines if it's killed abruptly at the end of the application's life.\n\n## This is probably not appropriate for your project if:\n+ You're already using or likely will be using a fleshed-out concurrency framework.\n+ You have many things you'd like to repeatedly schedule and run.\n+ Your callables absolutely **must** execute some cleanup code to avoid disaster on kill.\n\n\nThis is not a library intended for top-level program composition.\n\n## Installation:\n\n pip install recurring\n\n## Usage:\n\n\n import recurring\n\n def stuff():\n # do stuff ...\n\n seconds_between_stuff = 30\n\n job = recurring.job(stuff, seconds_between_stuff)\n job.start()\n\n # ...\n\n seconds_between_stuff = 300000000 # this will be *from when rate is set*, not *from the next scheduled call*\n job.rate = seconds_between_stuff\n\n # ...\n\n # stop making calls until start() is called again\n job.stop()\n\n # some time later ....\n job.start()\n\n # stop making calls permanently\n job.terminate()\n job.start() # raises RuntimeError\n job.rate = 3000 # raises RuntimeError\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jdodds/recurring", "keywords": "scheduling repeating cron sched threads", "license": "", "maintainer": "", "maintainer_email": "", "name": "recurring", "package_url": "https://pypi.org/project/recurring/", "platform": "", "project_url": "https://pypi.org/project/recurring/", "project_urls": { "Docs": "https://recurring.readthedocs.io", "Homepage": "https://github.com/jdodds/recurring", "Issue Tracker": "https://github.com/jdodds/recurring/issues", "Source": "https://github.com/jdodds/recurring" }, "release_url": "https://pypi.org/project/recurring/2.0.0/", "requires_dist": [ "m2r; extra == 'docs'" ], "requires_python": ">=3.6", "summary": "Run a function or other callable every N seconds", "version": "2.0.0" }, "last_serial": 3912163, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "47b41e8a16d7197e30cd4a4f32d78ebb", "sha256": "95b4de0bb1dabda84f80b0858eb5a8b7ba4de88a94f80feaf66047ca7a5dd705" }, "downloads": -1, "filename": "recurring-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "47b41e8a16d7197e30cd4a4f32d78ebb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4373, "upload_time": "2018-05-22T09:30:08", "url": "https://files.pythonhosted.org/packages/ca/61/84f5202c3ebac5d3782fe7266ee2ea9a60902226dad2d8d223a73339e120/recurring-1.0.0-py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8697eb0e1139e9f8e5f4b5554d42805d", "sha256": "caac368e158b0ed55616fdcd032ee27cf6a79c0c72b2f118c73a536312c83d4a" }, "downloads": -1, "filename": "recurring-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8697eb0e1139e9f8e5f4b5554d42805d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4381, "upload_time": "2018-05-24T09:22:33", "url": "https://files.pythonhosted.org/packages/d8/34/0a843352adfe58e11fb2c1d7da10e2b9230359d06da8026bf8948a6c27b4/recurring-1.0.1-py3-none-any.whl" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "45595b9342ae5ec9583a89e5d8cc1be2", "sha256": "08d25a10182da31b0d8c7a6c0d199706d7703026dd30c451594ee46d14133e69" }, "downloads": -1, "filename": "recurring-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "45595b9342ae5ec9583a89e5d8cc1be2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4617, "upload_time": "2018-05-30T09:42:24", "url": "https://files.pythonhosted.org/packages/35/6f/4e2ffc435bfcee7bcb83bad0d8307bd45842baa0b080e1efa55e07cc595d/recurring-2.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45595b9342ae5ec9583a89e5d8cc1be2", "sha256": "08d25a10182da31b0d8c7a6c0d199706d7703026dd30c451594ee46d14133e69" }, "downloads": -1, "filename": "recurring-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "45595b9342ae5ec9583a89e5d8cc1be2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4617, "upload_time": "2018-05-30T09:42:24", "url": "https://files.pythonhosted.org/packages/35/6f/4e2ffc435bfcee7bcb83bad0d8307bd45842baa0b080e1efa55e07cc595d/recurring-2.0.0-py3-none-any.whl" } ] }