You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,31 @@ if __name__ == "__main__":
119
119
asyncio.run(main())
120
120
```
121
121
122
+
### Network Retries
123
+
124
+
By default the `EDClient` will perform 3 retries when it encounters network issues. If you would like to customise this behaviour, you can pass in the `max_network_retries` param as show below:
125
+
126
+
Note: if the request times out, it will not be retried.
If you would like control over the read timeout, you can configure this either for all request by setting `timeout` when creating the `EDClient`, or you can specify the `timeout` per request, on any of the individual methods as shown below:
137
+
138
+
Note: the timeout is specified in seconds.
139
+
140
+
```python
141
+
from ensembledata.api import EDClient
142
+
143
+
client = EDClient("API-TOKEN", timeout=120)
144
+
result = client.tiktok.user_info_from_username(username="daviddobrik", timeout=10)
145
+
```
146
+
122
147
### Types
123
148
124
149
The package uses type hints, and is type checked with the latest version of `mypy`. If you experience any type checking related issues with the package, please let us know by creating an issue.
0 commit comments