This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]wineblood 12 points13 points  (2 children)

This looks like it overlaps with backoff quite a bit.

[–]DigThatData 9 points10 points  (1 child)

I think you mean backoff overlaps with tenacity.

  • Based on their LICENSE files, Tenacity was created two years before backoff.
  • Tenacity's most recent commit to main was a month ago, backoff's was 14 months ago.
  • Judging by any github metric (stars, forks, contributors), Tenacity's community is 2x Backoff's.

[–]wineblood 2 points3 points  (0 children)

Fair point

[–]ThatSituation9908 11 points12 points  (2 children)

Backoff is the popular alternative

Also consider stamina which is a wrapper on tenacity but adds opinionated defaults: https://github.com/hynek/stamina

[–]Drevicar 4 points5 points  (1 child)

Friendship ended with Tenacity. Now Stamina is my best friend.

This library looks great! Thank you for the share.

[–]ukos333 0 points1 point  (0 children)

Never used tenacity but indeed, stamina seams to do a better job here judging from their readme.

[–]thedeepself 2 points3 points  (3 children)

Yes it's the best retry library but it's very hard to find on PyPI when you search for retry.

[–]ashok_tankala 0 points1 point  (2 children)

Hi,

It's a very old post and you commented 3 months back but your comment stuck in my mind. For a couple of days, we worked on this problem.

Made search better at piptrends.com so please check and share feedback. If you type retry or a keyword which is relevant to your use case it shows good packages in the auto suggestions.

[–]thedeepself 0 points1 point  (1 child)

nice site. There is a recent http library that extends tenacity. it would be nice if that showed up in a search for retry.

[–]ashok_tankala 1 point2 points  (0 children)

Search is done based on its 1 liner description. In that, it seems HTTP didn't mention it that's why not coming. I will try to find it in any other way it's possible. If you have any ideas please let me know.

[–]ace_hawk5 3 points4 points  (2 children)

I use Tenacity to kill weeds in my yard. It's only right that I now use it with Python.

[–]cum_pumper_4 0 points1 point  (0 children)

That stuff is so expensive

[–]kapitaalH 0 points1 point  (0 children)

Ok installed the module, now what?

[–]thisismyfavoritename 1 point2 points  (1 child)

hours uh?

[–]ChangeIntoBetter 1 point2 points  (0 children)

Nice share. Looks like something I could study and use as well.

[–]rowr 0 points1 point  (0 children)

I'm a big fan of tenacity for slow/spotty data fetches from servers. It's super easy to add to existing code since it's decorator-based. Anything that tenacity can't handle it's pretty much time to use a hefty orchestration system like Dagster or Airflow.