@@ -26,15 +26,15 @@ class AsyncClient:
26
26
def from_env (
27
27
cls ,
28
28
verify_ssl : bool = True ,
29
- timeout : float = 120 ,
29
+ timeout : Optional [ float ] = None ,
30
30
max_retries : int = 3 ,
31
31
retry_delay : float = 1.0 ,
32
32
):
33
33
"""Initialize AsyncClient using API key from environment variable.
34
34
35
35
Args:
36
36
verify_ssl: Whether to verify SSL certificates
37
- timeout: Request timeout in seconds
37
+ timeout: Request timeout in seconds. None means no timeout (infinite)
38
38
max_retries: Maximum number of retry attempts
39
39
retry_delay: Delay between retries in seconds
40
40
"""
@@ -55,7 +55,7 @@ def __init__(
55
55
self ,
56
56
api_key : str = None ,
57
57
verify_ssl : bool = True ,
58
- timeout : float = 120 ,
58
+ timeout : Optional [ float ] = None ,
59
59
max_retries : int = 3 ,
60
60
retry_delay : float = 1.0 ,
61
61
):
@@ -64,7 +64,7 @@ def __init__(
64
64
Args:
65
65
api_key: API key for authentication. If None, will try to load from environment
66
66
verify_ssl: Whether to verify SSL certificates
67
- timeout: Request timeout in seconds
67
+ timeout: Request timeout in seconds. None means no timeout (infinite)
68
68
max_retries: Maximum number of retry attempts
69
69
retry_delay: Delay between retries in seconds
70
70
"""
@@ -90,7 +90,7 @@ def __init__(
90
90
self .retry_delay = retry_delay
91
91
92
92
ssl = None if verify_ssl else False
93
- self .timeout = ClientTimeout (total = timeout )
93
+ self .timeout = ClientTimeout (total = timeout ) if timeout is not None else None
94
94
95
95
self .session = ClientSession (
96
96
headers = self .headers , connector = TCPConnector (ssl = ssl ), timeout = self .timeout
0 commit comments