planetlabs / planet-client-python

Python client for Planet APIs
https://planet-sdk-for-python-v2.readthedocs.io/en/latest/
Apache License 2.0
272 stars 92 forks source link

update session limiting to take advantage of new 'burst' support in APIs #693

Open jreiberkyle opened 2 years ago

jreiberkyle commented 2 years ago

The APIs have been updated to support 'bursts' of requests. This means that TooManyRequests should no longer be returned if the number of initial requests is below the rate limit. Therefore, the current custom implementation of _Limit, which enforces a delay between requests, is likely no longer needed.

Try replacing _Limiter with asyncio-throttle and rerun session_configuration.py. Make note of total run time vs original and number of TooManyRequests errors. Given improved performance, implement the change and update docs.

tbarsballe commented 2 months ago

This may help with the problems described in #1050 as well