SurveyMonkey/python_guides — pull request #6 by philshem (2013-11-22 09:16:46+00:00)
Title: Improved handling of mashery timeouts during requests

Using time.sleep(), I added a sleep statement when a mashery timeout has been reached. The sleep amount is set with tsleep (line 13) and is in seconds. I also added a print statement in a new elif (lines 170-172) that let's the user know when a timeout was reached. The exact sleep amount may need to be tuned based on user's account level and corresponding API throttling quota (gold vs. platinum)