What and why is that?

Introduction

KaioRetry is (yet another?) retry decorator implementation, which is clearly inspired by the venerable retry module and is actually backward compatible with it.

I say backward because, while retry clearly did the job for me for a time, at some point I’ve encountered a big limitation: it did not work with asyncio coroutines. And the last commit is like 6 years old.

I found a few alternatives [1] [2] [3] [4] [5] but all of them had downsides and were not up to my standard and nor my needs.

What I wanted was to have a single module (to reduce the number of dependencies), to have the same API to decorate either sync or async functions (less things to remember), something that would have been maintained a bit.

So I started this project. With two things in mind:

  1. It should be backward compatible with retry, and

  2. The code duplication, between the sync and async versions of the decorator, should be smartly kept to a very very veeeeeery strict minimum. It’s a work in progress though.

Anyway, if you’re reading this documentation, it means I took my sweet time to write it [6]. After proving my implementation worked.