mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-07 12:27:47 +00:00
1.2 KiB
1.2 KiB
id, title, pagination_label, sidebar_label, sidebar_position, sidebar_class_name, keywords, description, slug, tags
| id | title | pagination_label | sidebar_label | sidebar_position | sidebar_class_name | keywords | description | slug | tags | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| python-sdk-retries | Retries with The Python SDK | Retries | Retries | 7 | pythonsdk |
|
Learn how to configure retries when using the Python SDK. | /tools/sdk/python/retries |
|
The Python SDK uses the urllib3 retry module to support retry logic.
Here is an example of the retry logic, implemented on line 8. With this configuration, if the returned status code from the API is equal to 502, 503, or 504, the SDK will retry the call up to 5 times:
import sailpoint
import sailpoint.v3
from sailpoint.configuration import Configuration
from sailpoint.paginator import Paginator
import urllib3
configuration = Configuration()
configuration.retries = urllib3.Retry(total=5, status_forcelist=[ 502, 503, 504 ])
api_client = sailpoint.v3.ApiClient(configuration)
accounts = Paginator.paginate(sailpoint.v3.AccountsApi(api_client).list_accounts, result_limit=1000, limit=250)
print(accounts)
Run this command to run the code:
python sdk.py