Optimising rate limiter #102
-
Thanks for this tool - I'm using it to extract marketplace stats for use in a data science course I'm taking. However I am finding the rate limiter seems to be adding excessive delays, such that 500 API calls take 950s. I've hardcoded a delay into my loop so each iteration takes as close to 1s as possible to avoid hitting the limit, but it would be nice to make this adjustable to account for the actual requests used/remaining - are the headers Discogs returns with this information available via the client? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @fdmackay You can disable the rate limiter with client.backoff_enabled(false) and you can access the rate limit headers with client._fethcer.rate_limit
client._fethcer.rate_limit_used
client._fethcer.rate_limit_remaining if I recall correctly |
Beta Was this translation helpful? Give feedback.
Hey @fdmackay
You can disable the rate limiter with
and you can access the rate limit headers with
if I recall correctly