pydactyl
pydactyl copied to clipboard
package does not respect rate limiting
Specifically, the headers retry-after, x-ratelimit-limit, and x-ratelimit-remaining
You are correct, it doesn't, and that should probably be improved. In your opinion what should it do to respect these headers?
As remaining approaches zero, implement a delay. Could be a default that can be overridden. When it reaches zero, the server sends "try-after: <x>" basically saying "You have no choice but to wait <x> seconds." In that case, you have to wait the full <x> seconds.
Suggested default delay, (4^(log(limit - remaining))) / 10
Great, thanks for your input. I'll try to get something added in the next week or so.
Better late than never, fixed by faf7922