Skip to content

Commit 8c2e9ab

Browse files
authored
docs: Improve docs on http client timeout (#698)
1 parent af99917 commit 8c2e9ab

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

obstore/python/obstore/_store/_client.pyi

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class ClientConfig(TypedDict, total=False):
4141

4242
allow_http: bool
4343
"""Allow non-TLS, i.e. non-HTTPS connections."""
44+
4445
allow_invalid_certificates: bool
4546
"""Skip certificate validation on https connections.
4647
@@ -52,8 +53,19 @@ class ClientConfig(TypedDict, total=False):
5253
introduces significant vulnerabilities, and should only be used
5354
as a last resort or for testing
5455
"""
56+
5557
connect_timeout: str | timedelta
56-
"""Timeout for only the connect phase of a Client"""
58+
"""Set a timeout for only the connect phase of a Client.
59+
60+
This is the time allowed for the client to establish a connection
61+
and if the connection is not established within this time,
62+
the client returns a timeout error.
63+
64+
Timeout errors are retried, subject to the `RetryConfig`.
65+
66+
Default is 5 seconds.
67+
"""
68+
5769
default_content_type: str
5870
"""Default [`CONTENT_TYPE`] for uploads.
5971
@@ -108,10 +120,15 @@ class ClientConfig(TypedDict, total=False):
108120

109121
"""HTTP proxy to use for requests."""
110122
timeout: str | timedelta
111-
"""Request timeout.
123+
"""Set timeout for the overall request
124+
125+
The timeout starts from when the request starts connecting until the
126+
response body has finished. If the request does not complete within the
127+
timeout, the client returns a timeout error.
128+
129+
Timeout errors are retried, subject to the `RetryConfig`.
112130
113-
The timeout is applied from when the request starts connecting until the
114-
response body has finished.
131+
Default is 30 seconds.
115132
"""
116133
user_agent: str
117134
"""[User-Agent] header to be used by this client.

0 commit comments

Comments
 (0)