Skip to content

Commit 95c2772

Browse files
feat: allow a default timeout to be set for clients (#61)
1 parent 6bcfaac commit 95c2772

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ client.with_options(max_retries=5).hris.directory.list_individuals()
205205

206206
### Timeouts
207207

208-
Requests time out after 60 seconds by default. You can configure this with a `timeout` option,
208+
Requests time out after 1 minute by default. You can configure this with a `timeout` option,
209209
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration):
210210

211211
```python

src/finch/_base_client.py

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
_AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any])
8383

8484

85+
# default timeout is 1 minute
8586
DEFAULT_TIMEOUT = Timeout(timeout=60.0, connect=5.0)
8687
DEFAULT_MAX_RETRIES = 2
8788
DEFAULT_LIMITS = Limits(max_connections=100, max_keepalive_connections=20)

0 commit comments

Comments
 (0)