An error with a 429 status code will be returned when the rate limit has been exceeded.
RATE LIMIT ERRORS
If the defined rate limit is exceeded, Dashboard API will reply with the 429 (rate limit exceeded) error code. This response will also return a Retry-After header indicating how long the client should wait before making a follow-up request.
The Retry-After key contains the number of seconds the client should delay. A simple example which minimizes rate limit errors:
Wait - you've managed to get a Python script to make more than 5 requests a second? I find that Python is so slow that this is usually difficult to achieve - especially if you are doing some processing of the returned data.
I saw quite a good library somewhere (I think it was node.js where this is a real issue because of its speed) that actually used a queue. The library submitted your requests to a queue and then a seperate process de-queued the requests at a rate of 5 per second and then called you back with the return value.
And then someone else in your company starts running a script eating into your 5 API calls per second and you are screwed again.