googlearchive / PyDrive

Google Drive API Python wrapper library
Other
1.31k stars 273 forks source link

Retries for failed API requests #200

Open craigcitro opened 4 years ago

craigcitro commented 4 years ago

Currently, pydrive uses googleapiclient for all Drive API operations, but doesn't retry any failed requests. However, the Drive API recommends retries with exponential backoff for many errors, and googleapiclient supports retries for all requests.

Would it be possible to add retry behavior as per the Drive API recommendations?

(Additionally, it'd be great to add this for the initial client creation, as the discovery service can also throw 500s.)

Thanks!