Best Practices for Implementing Python Requests Retry: How Do You Handle Failed Requests?

8 Replies, 2341 Views

Wow, thanks everyone! This is super helpful. I’ve been playing around with `urllib3` and `requests.Session` based on your suggestions, and it’s already way better than what I was doing before.

I’m gonna check out `tenacity` and `requests-retry` too—those sound like they could save me a ton of time.

Quick follow-up: How do y’all handle logging retries? Like, do you log every failed attempt or just the final failure?

Thanks again, you guys are legends!

Messages In This Thread



Users browsing this thread: 1 Guest(s)