{ "info": { "author": "Ask Solem", "author_email": "ask@celeryproject.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#############################################\n timer2 - Schedule Python functions.\n#############################################\n\n:Version: 0.1.0\n\nIntroduction\n------------\n\nThe ``timer2`` module lets you schedule Python functions at specific times,\nor at an interval. It can be used as a replacement to ``threading.Timer``,\nthe difference is that ``timer2`` is always only using a single thread (unless\nyou manually start more of them)\n\nYou should never use this to apply expensive operations, as this would not\nbe effective when running in a single thread, rather you should make the\ntimer move the operations to a execution pool (like a thread/multiprocessing\npool, or maybe sending a message)::\n\n >>> pool = multiprocessing.Pool()\n >>> timer2.apply_after(10000, pool.apply_async, (expensive_fun, ))\n\nDocumentation\n-------------\n\nTimer is using Sphinx, and the latest documentation is available at GitHub:\n\n http://ask.github.com/timer2\n\nInstallation\n============\n\nYou can install ``timer2`` either via the Python Package Index (PyPI)\nor from source.\n\nTo install using ``pip``,::\n\n $ pip install timer2\n\nTo install using ``easy_install``,::\n\n $ easy_install timer2\n\n\nIf you have downloaded a source tarball you can install it\nby doing the following,::\n\n $ python setup.py build\n # python setup.py install # as root\n\n\nExamples\n========\n\nApply function after ``n`` msecs::\n\n >>> import timer2\n >>> timer2.apply_after(msecs, fun, args, kwargs, priority=0)\n\nApply function every ``n`` msecs::\n\n >>> timer2.apply_interval(msecs, fun, args, kwargs, priority=0)\n\nApply function at a specific date (a ``datetime`` object)::\n\n >>> timer2.apply_at(datetime, fun, args, kwargs, priority=0)\n\nCancelling timers\n-----------------\n\nThe ``apply_*`` functions returns a ``timer2.Entry`` instance,\nyou can use this to cancel the execution::\n\n >>> tref = timer2.apply_after(msecs, fun, args, kwargs)\n >>> tref.cancel()\n\n\nRunning custom ``Timer`` threads\n--------------------------------\n\nWhen using the module interface a default timer thread is started\nas soon as you schedule something. If you want to keep track of the\nthread manually, you can use the ``timer2.Timer`` class::\n\n >>> timer = timer2.Timer()\n >>> timer.apply_after(msecs, fun, args, kwargs)\n >>> timer.stop() # stops the thread and joins it.\n\nBug tracker\n===========\n\nIf you have any suggestions, bug reports or annoyances please report them\nto our issue tracker at http://github.com/ask/timer2/issues/\n\nContributing\n============\n\nDevelopment of ``timer2`` happens at Github: http://github.com/ask/timer2\n\nYou are highly encouraged to participate in the development. If you don't\nlike Github (for some reason) you're welcome to send regular patches.\n\nLicense\n=======\n\nThis software is licensed under the ``New BSD License``. See the ``LICENSE``\nfile in the top distribution directory for the full license text.", "description_content_type": null, "docs_url": "https://pythonhosted.org/timer2/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ask/timer/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "timer2", "package_url": "https://pypi.org/project/timer2/", "platform": "any", "project_url": "https://pypi.org/project/timer2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/ask/timer/" }, "release_url": "https://pypi.org/project/timer2/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "timer2 - Scheduler for Python functions.", "version": "0.1.0" }, "last_serial": 800694, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "44fd10e5239cba9e90182476ffc76263", "sha256": "f20b97c4c48c9a88c05e614d46f9ab10865a7c6c3156e382ed55c1e2c9873018" }, "downloads": -1, "filename": "timer2-0.1.0.tar.gz", "has_sig": false, "md5_digest": "44fd10e5239cba9e90182476ffc76263", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126011, "upload_time": "2010-08-05T22:20:18", "url": "https://files.pythonhosted.org/packages/6a/24/7e395fc0f5fb593f206780232255283b7c7feec1c404263307d33ab8f358/timer2-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "44fd10e5239cba9e90182476ffc76263", "sha256": "f20b97c4c48c9a88c05e614d46f9ab10865a7c6c3156e382ed55c1e2c9873018" }, "downloads": -1, "filename": "timer2-0.1.0.tar.gz", "has_sig": false, "md5_digest": "44fd10e5239cba9e90182476ffc76263", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126011, "upload_time": "2010-08-05T22:20:18", "url": "https://files.pythonhosted.org/packages/6a/24/7e395fc0f5fb593f206780232255283b7c7feec1c404263307d33ab8f358/timer2-0.1.0.tar.gz" } ] }