{ "info": { "author": "\u0160ar\u016bnas Navickas", "author_email": "zaibacu@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.org/zaibacu/pyRobustness.svg?branch=master)](https://travis-ci.org/zaibacu/pyRobustness)\nAbout\n=====\nA simple util library for creating applications which needs to keep running, despite abnormalities\n\nInstalling\n==========\n`pip install pyrobustness`\n\nUsage\n=====\n\nTimeout example:\n```python\nfrom robust.tools import timeout\n\n\n@timeout(5)\ndef very_long_job():\n import time\n while True:\n print(\"Zzz\")\n time.sleep(1)\n\nvery_long_job()\n```\n\nRetry example:\n```python\nfrom robust.tools import retry\n\n@retry(5)\ndef very_broken_method():\n print(\".\")\n raise RuntimeError(\"Something is broken...\")\n\nwhile True:\n very_broken_method()\n\n```\n\nCircuit Breaker example:\n\n```python\nimport time\nfrom robust.tools import breaker\n\ncounter = 0\n\n@breaker(limit=5, revive=5)\ndef very_broken_method():\n nonlocal counter\n if counter <= 5:\n counter += 1\n \traise RuntimeError(\"Something is broken...\")\n else:\n print(\"We've made it!\")\n\n\nwhile True:\n try:\n \tvery_broken_method()\n except RuntimeError:\n pass\n except Exception:\n break\n\ntime.sleep(5)\nvery_broken_method()\n```\n\n\nVersion History\n===============\n- 1.1: \n - Additional type for alarm - threading to support Windows OS, or certain cases when signal is not working as supposed\n - CircuitBreaker pattern, inspired by speech by Daniel Riti @Pycon 2016\n- 1.0: Initial version\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/zaibacu/pyRobustness", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyrobustness", "package_url": "https://pypi.org/project/pyrobustness/", "platform": "", "project_url": "https://pypi.org/project/pyrobustness/", "project_urls": { "Homepage": "https://github.com/zaibacu/pyRobustness" }, "release_url": "https://pypi.org/project/pyrobustness/1.1.2/", "requires_dist": null, "requires_python": "", "summary": "A simple util library for creating applications which needs to keep running, despite abnormalities", "version": "1.1.2" }, "last_serial": 5011564, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "13f455472596d17c2405e41384455b60", "sha256": "884225b0a4852213ef35a7d92b2f1c8adc8b7f7f4e4075508a418e1cf3c179d1" }, "downloads": -1, "filename": "pyrobustness-1.0.0.tar.gz", "has_sig": false, "md5_digest": "13f455472596d17c2405e41384455b60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2017, "upload_time": "2015-11-13T18:18:49", "url": "https://files.pythonhosted.org/packages/54/06/42d5d9a8dbf265b985ed578aeb1e4ee6c4d14864b7e9ef7311923f33d238/pyrobustness-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "ec7e045c042391bf9dfdfc6595bb8ec2", "sha256": "98530ab70f5adf02f4d77f824a14306951ac3c2c32c8ccf60060c3c1bfa51765" }, "downloads": -1, "filename": "pyrobustness-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ec7e045c042391bf9dfdfc6595bb8ec2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2845, "upload_time": "2016-06-04T17:28:59", "url": "https://files.pythonhosted.org/packages/0c/2a/b90c7aed71c1a2e2591ac55008192091028fea4e67316ed7a50c51e6b69c/pyrobustness-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "bb0a10afd15c97d2c41d5e4e15ed89e6", "sha256": "798f03b47cbac3f9d086101ed322d36127f6527c5d4a935dd6eff5462d6bf11e" }, "downloads": -1, "filename": "pyrobustness-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "bb0a10afd15c97d2c41d5e4e15ed89e6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4796, "upload_time": "2019-04-01T05:44:03", "url": "https://files.pythonhosted.org/packages/6d/2c/aaf0e1b418503c454b91083167445f7a0cd902a865cc68fbcbd876a388e4/pyrobustness-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "492f731e48513a212e8067773be274fe", "sha256": "93dc2c141e846a49fa1786ad4e57d6633a36944cfd90e4d542b3373126fbc7bd" }, "downloads": -1, "filename": "pyrobustness-1.1.1.tar.gz", "has_sig": false, "md5_digest": "492f731e48513a212e8067773be274fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3211, "upload_time": "2019-04-01T05:44:04", "url": "https://files.pythonhosted.org/packages/a8/3a/129c116b9d269e2626421b8751442e6c11b29d29f55fb24147e718a5b4cc/pyrobustness-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "ced517c899982454a7ce8386c8faec77", "sha256": "ce74daa3e528e65fe083170e3672f53482f9cfe5dabc41485eb1351382ac0e8e" }, "downloads": -1, "filename": "pyrobustness-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ced517c899982454a7ce8386c8faec77", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5384, "upload_time": "2019-04-01T05:46:48", "url": "https://files.pythonhosted.org/packages/27/89/9d487e513136bde56e70ab436a4edbc207a0b5d28340dd85cb96d328e152/pyrobustness-1.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2487617c6d5a6f77ecc60b40c305b173", "sha256": "0aeed1e808aea7320cde4cb0191c8c17d94fecfa5f192f64cfa8a999bc397779" }, "downloads": -1, "filename": "pyrobustness-1.1.2.tar.gz", "has_sig": false, "md5_digest": "2487617c6d5a6f77ecc60b40c305b173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3474, "upload_time": "2019-04-01T05:46:50", "url": "https://files.pythonhosted.org/packages/e0/df/5f80b9eea8360c3a37db211cf91ba154810339abc4adcc1bcb23dc3b3422/pyrobustness-1.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ced517c899982454a7ce8386c8faec77", "sha256": "ce74daa3e528e65fe083170e3672f53482f9cfe5dabc41485eb1351382ac0e8e" }, "downloads": -1, "filename": "pyrobustness-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ced517c899982454a7ce8386c8faec77", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5384, "upload_time": "2019-04-01T05:46:48", "url": "https://files.pythonhosted.org/packages/27/89/9d487e513136bde56e70ab436a4edbc207a0b5d28340dd85cb96d328e152/pyrobustness-1.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2487617c6d5a6f77ecc60b40c305b173", "sha256": "0aeed1e808aea7320cde4cb0191c8c17d94fecfa5f192f64cfa8a999bc397779" }, "downloads": -1, "filename": "pyrobustness-1.1.2.tar.gz", "has_sig": false, "md5_digest": "2487617c6d5a6f77ecc60b40c305b173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3474, "upload_time": "2019-04-01T05:46:50", "url": "https://files.pythonhosted.org/packages/e0/df/5f80b9eea8360c3a37db211cf91ba154810339abc4adcc1bcb23dc3b3422/pyrobustness-1.1.2.tar.gz" } ] }