Rate limiting library?

Thanks @peter.ludemann but just to clarify, this would be client-side rate limiting. I’m running api calls and hitting the rate limiting on the target endpoint so what I’m trying to do is rate limit my client to a certain number of max requests per minute, not defensively rate limit requests to my own server.