tencentcloud-sdk-python-common 3.0.1129__tar.gz → 3.0.1135__tar.gz
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 tencentcloud-sdk-python-common might be problematic. Click here for more details.
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/PKG-INFO +1 -1
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/__init__.py +1 -1
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/abstract_client.py +21 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud_sdk_python_common.egg-info/PKG-INFO +1 -1
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/README.rst +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/setup.cfg +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/setup.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/__init__.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/abstract_model.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/circuit_breaker.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/common_client.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/credential.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/exception/__init__.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/exception/tencent_cloud_sdk_exception.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/http/__init__.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/http/pre_conn.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/http/request.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/profile/__init__.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/profile/client_profile.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/profile/http_profile.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud/common/sign.py +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud_sdk_python_common.egg-info/SOURCES.txt +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud_sdk_python_common.egg-info/dependency_links.txt +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud_sdk_python_common.egg-info/requires.txt +0 -0
- {tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/tencentcloud_sdk_python_common.egg-info/top_level.txt +0 -0
|
@@ -400,6 +400,13 @@ class AbstractClient(object):
|
|
|
400
400
|
elif key == 'retry':
|
|
401
401
|
e[key] = int(val)
|
|
402
402
|
|
|
403
|
+
@staticmethod
|
|
404
|
+
def _process_response_json(resp, resp_type):
|
|
405
|
+
resp_obj = json.loads(resp.content)["Response"]
|
|
406
|
+
model = resp_type()
|
|
407
|
+
model._deserialize(resp_obj)
|
|
408
|
+
return model
|
|
409
|
+
|
|
403
410
|
def _call(self, action, params, options=None, headers=None):
|
|
404
411
|
if headers is None:
|
|
405
412
|
headers = {}
|
|
@@ -513,6 +520,20 @@ class AbstractClient(object):
|
|
|
513
520
|
self._check_error(resp)
|
|
514
521
|
return self._process_response_sse(resp)
|
|
515
522
|
|
|
523
|
+
def _call_and_deserialize(self, action, params, resp_type, headers=None, options=None):
|
|
524
|
+
resp = self._call(action, params, options, headers)
|
|
525
|
+
self._check_status(resp)
|
|
526
|
+
self._check_error(resp)
|
|
527
|
+
return self._process_response(resp, resp_type)
|
|
528
|
+
|
|
529
|
+
def _process_response(self, resp, resp_type):
|
|
530
|
+
if resp.headers.get('Content-Type') == "text/event-stream":
|
|
531
|
+
logger.debug("GetResponse: %s", ResponsePrettyFormatter(resp, format_body=False))
|
|
532
|
+
return self._process_response_sse(resp)
|
|
533
|
+
|
|
534
|
+
logger.debug("GetResponse: %s", ResponsePrettyFormatter(resp))
|
|
535
|
+
return self._process_response_json(resp, resp_type)
|
|
536
|
+
|
|
516
537
|
def set_stream_logger(self, stream=None, level=logging.DEBUG, log_format=None):
|
|
517
538
|
"""
|
|
518
539
|
Add a stream handler
|
{tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/README.rst
RENAMED
|
File without changes
|
{tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/setup.cfg
RENAMED
|
File without changes
|
{tencentcloud-sdk-python-common-3.0.1129 → tencentcloud-sdk-python-common-3.0.1135}/setup.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|