I really wouldn't suggest changing the code to anyone. Requests Retry-After will give you the identical results. I've built all my python codes using Meraki library and when I tried converting it to Requests with the IF statement I still get the same error 429 with a Retry-After in 59 or 60 seconds. Nothing greater or less and I had a max retry of 10. I thought the Retry-After would give off random seconds, but it was consistently 59 or 60. Because of this result, I'm adding time.sleep() with a random integer in between API calls and use this setting for my dashboard. dashboard = meraki.DashboardAPI(API_KEY, suppress_logging=True,wait_on_rate_limit=True,maximum_retries=10) Supposedly Meraki is looking into increasing the API calls to 50, but this was in early Alpha stages when I asked my rep.
... View more