internal 1.0.59__py3-none-any.whl → 1.0.61__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

internal/base_config.py CHANGED
@@ -14,10 +14,10 @@ class BaseConfig(BaseSettings):
14
14
  REQUEST_VERIFY_SSL: bool = True
15
15
  REQUEST_PROXY: str = ''
16
16
  REQUEST_RETRY: int = 5
17
+ REQUEST_CONN_POOL_TIMEOUT: float = 5
17
18
  REQUEST_CONN_TIMEOUT: float = 5
18
- REQUEST_READ_TIMEOUT: float = 5
19
19
  REQUEST_WRITE_TIMEOUT: float = 5
20
- REQUEST_POOL_TIMEOUT: float = 5
20
+ RESPONSE_READ_TIMEOUT: float = 5
21
21
 
22
22
  # AWS
23
23
  AWS_ACCESS_KEY_ID: str = ""
@@ -55,6 +55,8 @@ class BaseConfig(BaseSettings):
55
55
  # Default System Account Password
56
56
  SYSTEM_ACCOUNT: str = "cruisys"
57
57
  SYSTEM_PASSWORD: str = "cs50951855"
58
+ SYSTEM_BRAND: str = "cruisys"
59
+ SYSTEM_ORGANIZATION_ID: str = "cruisys"
58
60
 
59
61
  class Config:
60
62
  case_sensitive = False
internal/http/requests.py CHANGED
@@ -6,9 +6,21 @@ from fastapi.encoders import jsonable_encoder
6
6
  from ..exception.internal_exception import GatewayTimeoutException, BadGatewayException
7
7
 
8
8
 
9
- async def async_request(app: FastAPI, method, url, current_user: dict = None, **kwargs):
10
- timeout = httpx.Timeout(connect=app.state.config.REQUEST_CONN_TIMEOUT, read=app.state.config.REQUEST_READ_TIMEOUT,
11
- write=app.state.config.REQUEST_WRITE_TIMEOUT, pool=app.state.config.REQUEST_POOL_TIMEOUT)
9
+ async def async_request(app: FastAPI, method, url, current_user: dict = None,
10
+ request_conn_pool_timeout: float = 0, request_conn_timeout: float = 0,
11
+ request_write_timeout: float = 0, response_read_timeout: float = 0,
12
+ **kwargs):
13
+ if request_conn_pool_timeout <= 0:
14
+ request_conn_pool_timeout = app.state.config.REQUEST_CONN_POOL_TIMEOUT
15
+ if request_conn_timeout <= 0:
16
+ request_conn_timeout = app.state.config.REQUEST_CONN_TIMEOUT
17
+ if request_write_timeout <= 0:
18
+ request_write_timeout = app.state.config.REQUEST_WRITE_TIMEOUT
19
+ if response_read_timeout <= 0:
20
+ response_read_timeout = app.state.config.RESPONSE_READ_TIMEOUT
21
+
22
+ timeout = httpx.Timeout(connect=request_conn_timeout, read=response_read_timeout,
23
+ write=request_write_timeout, pool=request_conn_pool_timeout)
12
24
 
13
25
  if current_user and "access_token" in current_user:
14
26
  if "headers" in kwargs.keys():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: internal
3
- Version: 1.0.59
3
+ Version: 1.0.61
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -1,5 +1,5 @@
1
1
  internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- internal/base_config.py,sha256=ZdqvHlPsF6ozELgmV0ZiSpYehSscasIclLp8eAjVE24,1870
2
+ internal/base_config.py,sha256=tuEu2m98igYt4ZxMKtWjaQrFokpc85cRQcAjGtf_cI0,1954
3
3
  internal/base_factory.py,sha256=7UUiolLWYSodc9PxqLHaZ6KqDYUU3kC4g07iVggSymU,10125
4
4
  internal/common_enum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  internal/common_enum/contact_type.py,sha256=7QkTQ71UxpaT1YHI40FpjmLz3r-UbRU-sd0m5ajH1as,142
@@ -19,7 +19,7 @@ internal/ext/amazon/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
19
19
  internal/ext/amazon/aws/__init__.py,sha256=2YFjb-rHG1JaZGZiZffYDesgTAJjDshOqQbswOYzhP8,834
20
20
  internal/ext/amazon/aws/const.py,sha256=l4WMg5bKWujwOKABBkCO2zclNg3abnYOfbhD7DG8GsA,109
21
21
  internal/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- internal/http/requests.py,sha256=PA3Z9Yqb-TWO-bP1xVvRAw8LptZTJPPt1MrfukpVJqk,2167
22
+ internal/http/requests.py,sha256=W6MFRs3pBTzHRWzTnkqXT52k6qiTPbmwxXgrJqcMvo4,2750
23
23
  internal/http/responses.py,sha256=_xhp52Y4T8tGQ4g6U8gh71WADLECibOAV42jKSvtvtw,2923
24
24
  internal/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  internal/interface/base_interface.py,sha256=3YaVjIgLi_pZpLk5SEIk8WVkuICM8qPavT8rB0MdB5U,1536
@@ -29,6 +29,6 @@ internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  internal/model/base_model.py,sha256=NS_GZvw_IqU1aZPHPpyQs6A741O34ybmzVzBPm9nGWU,3014
30
30
  internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
31
31
  internal/utils.py,sha256=CXYZs4rDDe33Zac27YeknBE4uQN437ys1YAbW3Xeyow,1517
32
- internal-1.0.59.dist-info/METADATA,sha256=aPhw--KFIRCLOY4csF9gGhu42Ok2-DUTr26TdAhhLFM,625
33
- internal-1.0.59.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
- internal-1.0.59.dist-info/RECORD,,
32
+ internal-1.0.61.dist-info/METADATA,sha256=H1zqTSqZUa7vUKxPNr2lvmLZFhqbg3W3-u3tHsn1oDo,625
33
+ internal-1.0.61.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
34
+ internal-1.0.61.dist-info/RECORD,,