File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
src/saic_ismart_client_ng Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " saic_ismart_client_ng"
3- version = " 0.8.0 "
3+ version = " 0.8.1 "
44description = " SAIC next gen client library (MG iSMART)"
55authors = [
66 {
name =
" Giovanni Condello" ,
email =
" [email protected] " },
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ def __init__(
1313 tenant_id : str = "459771" ,
1414 region : str = "eu" ,
1515 sms_delivery_delay : float = 3.0 ,
16+ read_timeout : float = 5.0 ,
1617 ) -> None :
1718 self .__username = username
1819 self .__password = password
@@ -22,6 +23,7 @@ def __init__(
2223 self .__tenant_id = tenant_id
2324 self .__region = region
2425 self .__sms_delivery_delay = sms_delivery_delay
26+ self .__read_timeout = read_timeout
2527
2628 @property
2729 def username (self ) -> str :
@@ -54,3 +56,7 @@ def region(self) -> str:
5456 @property
5557 def sms_delivery_delay (self ) -> float :
5658 return self .__sms_delivery_delay
59+
60+ @property
61+ def read_timeout (self ) -> float :
62+ return self .__read_timeout
Original file line number Diff line number Diff line change 55from typing import TYPE_CHECKING
66
77import httpx
8- from httpx import Request , Response
8+ from httpx import Request , Response , Timeout
99
1010from saic_ismart_client_ng .net .httpx import (
1111 decrypt_httpx_response ,
@@ -29,10 +29,11 @@ def __init__(
2929 self .__user_token : str = ""
3030 self .__class_name : str = ""
3131 self .__client = httpx .AsyncClient (
32+ timeout = Timeout (timeout = configuration .read_timeout ),
3233 event_hooks = {
3334 "request" : [self .__invoke_request_listener , self .__encrypt_request ],
3435 "response" : [decrypt_httpx_response , self .__invoke_response_listener ],
35- }
36+ },
3637 )
3738
3839 async def send (self , request : Request ) -> Response :
You can’t perform that action at this time.
0 commit comments