Adds basic retries to rest API requests for Python asyncio (#17014)

* Adds basic retries to API requests

 * This mimics the basic retries performed by urllib3 in the sync version

* update samples

* Only use retry client if number of retries is specified in the config

* Reorganize

* Remove class attribute

* close retry_client

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Pat Buxton
2023-11-21 02:42:34 +00:00
committed by GitHub
parent 489d369ee7
commit 9970c06f8c
8 changed files with 56 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
"python-dateutil",
"aiohttp >= 3.0.0",
"aiohttp-retry >= 2.8.3",
"pem>=19.3.0",
"pycryptodome>=3.9.0",
"pydantic >= 2",