Is there a way to configure an SDK-based REST API ...
# singer-tap-development
m
Is there a way to configure an SDK-based REST API tap to respect an API rate limit of “maximum of 500 calls per hour and 60 calls per minute” ? The API is returning a 429 response when the limit is exceeded
1
e
If you mean proactively rate-limiting on the client side rather than just retrying after a 429 is returned, I've used
pyrate-limiter
in https://github.com/MeltanoLabs/tap-stackexchange/blob/e6990fab1b573a6aa38ba6a8202e3a8834450082/tap_stackexchange/client.py#L121-L149. It's admittedly more complicated than it should probably be 😅.
a
I'm assuming you don't get any info in response as to remaining calls left/time till allocation resets?
m
@Andy Carter correct, I don’t. @Edgar Ramírez (Arch.dev) thanks! That looks exactly like what I’d like to do
🙌 1