airtable.py
airtable.py copied to clipboard
feat: add retry
Airtable rate limits to 5 requests per second across all bases. They return http code 429 when you hit this limit. This PR introduces retries via the requests retry functionality with back off so this error can be avoided.
I think this is a better approach than local rate limiting as there maybe multiple clients accessing the API, and is more aligned with the official node library
Please use requests_mock lib to mock response instead of adding a new library.
Unfortunately requests_mock uses a custom adapter, which replaces the retry adapter. It can't be used to test adapter features.
Will fix up the rest, do you use a formatter for these I can run?