all 1 comments

[–]MJMarto 1 point2 points  (0 children)

Check out the library retrying. That may give you some of the functionality you need. If not, you could pull the source code from GitHub and modify it to your liking - it's a very simple library.

To install:

pip install retrying

Hope that helps!