{"repo":"hynek/stamina","free":true,"listed":false,"github":"https://github.com/hynek/stamina","clone":"git clone https://github.com/hynek/stamina.git","description":"Production-grade retries for Python","language":"Python","stars":1442,"topics":["retry","python","retrying","reliability"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"stamina : Production-grade Retries Made Easy --- Transient failures are common in distributed systems. To make your systems resilient, you need to retry failed operations. But bad retries can make things much worse . stamina is an opinionated wrapper around the great-but-unopinionated Tenacity package. Our goal is to be as ergonomic as possible, while doing the right thing by default , and minimizing the potential for misuse . It is the result of years of copy-pasting the same configuration over and over again: - Retry only on certain exceptions – or even a subset of them by introspecting them first using a backoff hook. - Exponential backoff with jitter between retries. - Limit the number of retries and total time. - Automatic async support – including Trio. - Preserve type hints of the decorated callable. - Flexible instrumentation with Prometheus, structlog , and standard library's logging support out-of-the-box. - Dedicated support for testing that allows to globally deactivate retries, or to limit the number of retries and to remove backoffs. For example: Async callables work use the same API and it's possible to retry arbitrary blocks , too. Check out our tutorial for more examples! Or, if you prefer video, here's a brief introduction into retries and stamina : Project Links - PyPI - GitHub - Documentation - Changelog - Funding Credits stamina is written by Hynek Schlawack and distributed under the terms of the MIT license. The development is kindly supported by my empl","default_branch":null,"files":null,"tree":[],"storefront":"/r/hynek","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hynek/stamina/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}