vutran1710/PyrateLimiter

Changing rate limit after limiter was configured

Closed this issue · 3 comments

estahn commented

I would like to change the limiter configuration after the decoration was applied for these reasons:

  1. Testing - allow to set a lower threshold for testing in order to preserve time/CPU cycles
  2. Reconfigure from HTTP request headers:

Some API's return their remaining volume (e.g. X-RateLimit-Remaining) via headers, and I would like to set the limiter values to these if available.

@estahn i agree this should be implemented,
yet im planning to release the next major version so im not going to invest more time on the current version -

of course if you can lend a hand making a PR, then we can update it immediately

estahn commented

@vutran1710 I was able to resolve my issue differently hence I'm not in urgent need. If I find some time I contribute.

closing.