baiducloud-python-sdk-blb 0.0.1__tar.gz → 0.0.2__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.
Files changed (32) hide show
  1. baiducloud-python-sdk-blb-0.0.2/ChangeLog.md +4 -0
  2. {baiducloud_python_sdk_blb-0.0.1/baiducloud_python_sdk_blb.egg-info → baiducloud-python-sdk-blb-0.0.2}/PKG-INFO +4 -17
  3. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/__init__.py +1 -1
  4. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/api/blb_client.py +6 -3
  5. baiducloud-python-sdk-blb-0.0.2/baiducloud_python_sdk_blb/models/blb_inquiry_response.py +62 -0
  6. baiducloud-python-sdk-blb-0.0.2/baiducloud_python_sdk_blb/models/price.py +82 -0
  7. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2/baiducloud_python_sdk_blb.egg-info}/PKG-INFO +4 -17
  8. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb.egg-info/SOURCES.txt +2 -0
  9. baiducloud_python_sdk_blb-0.0.1/ChangeLog.md +0 -2
  10. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/LICENSE +0 -0
  11. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/MANIFEST.in +0 -0
  12. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/README-CN.md +0 -0
  13. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/README.md +0 -0
  14. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/api/__init__.py +0 -0
  15. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/__init__.py +0 -0
  16. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing.py +0 -0
  17. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing_change_cancel_to_post_blb_request.py +0 -0
  18. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing_change_post_to_pre_blb_request.py +0 -0
  19. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing_change_post_to_pre_blb_response.py +0 -0
  20. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing_change_pre_to_post_blb_request.py +0 -0
  21. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/billing_change_pre_to_post_blb_response.py +0 -0
  22. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/blb_inquiry_request.py +0 -0
  23. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/refund_blb_request.py +0 -0
  24. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/reservation.py +0 -0
  25. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/resize_blb_request.py +0 -0
  26. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/models/resize_blb_response.py +0 -0
  27. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb/setup.py +0 -0
  28. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb.egg-info/dependency_links.txt +0 -0
  29. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb.egg-info/requires.txt +0 -0
  30. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/baiducloud_python_sdk_blb.egg-info/top_level.txt +0 -0
  31. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/setup.cfg +0 -0
  32. {baiducloud_python_sdk_blb-0.0.1 → baiducloud-python-sdk-blb-0.0.2}/setup.py +0 -0
@@ -0,0 +1,4 @@
1
+ 2026-04-02 Version: 0.0.2
2
+ - 【blb】询价接口添加响应
3
+ 2026-03-20 Version: 0.0.1
4
+ - 【blb】python sdk自动生成
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: baiducloud-python-sdk-blb
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Baidu Cloud blbApi SDK Library for Python
5
5
  Home-page: https://github.com/baidubce/baiducloud-python-sdk
6
6
  Author: Baidu Cloud SDK
@@ -10,6 +10,7 @@ Project-URL: Source, https://github.com/baidubce/baiducloud-python-sdk
10
10
  Project-URL: Documentation, https://github.com/baidubce/baiducloud-python-sdk/tree/master/docs
11
11
  Project-URL: Changelog, https://github.com/baidubce/baiducloud-python-sdk/blob/master/baiducloud-python-sdk-blb/ChangeLog.md
12
12
  Keywords: baiducloud,blb
13
+ Platform: UNKNOWN
13
14
  Classifier: Development Status :: 5 - Production/Stable
14
15
  Classifier: Intended Audience :: Developers
15
16
  Classifier: License :: OSI Approved :: Apache Software License
@@ -29,21 +30,6 @@ Classifier: Programming Language :: Python :: 3.11
29
30
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4
30
31
  Description-Content-Type: text/markdown
31
32
  License-File: LICENSE
32
- Requires-Dist: pycryptodome>=3.8.0
33
- Requires-Dist: future>=0.6.0
34
- Requires-Dist: six>=1.4.0
35
- Dynamic: author
36
- Dynamic: classifier
37
- Dynamic: description
38
- Dynamic: description-content-type
39
- Dynamic: home-page
40
- Dynamic: keywords
41
- Dynamic: license
42
- Dynamic: license-file
43
- Dynamic: project-url
44
- Dynamic: requires-dist
45
- Dynamic: requires-python
46
- Dynamic: summary
47
33
 
48
34
  English | [简体中文](README-CN.md)
49
35
 
@@ -83,3 +69,4 @@ Detailed changes for each release are documented in the [release notes](./Change
83
69
  ## License
84
70
 
85
71
  [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
72
+
@@ -2,4 +2,4 @@
2
2
  This module defines some common string constants.
3
3
  """
4
4
 
5
- SDK_VERSION = b'0.0.1'
5
+ SDK_VERSION = b'0.0.2'
@@ -13,6 +13,7 @@ from baiducloud_python_sdk_core.http import handler
13
13
  from baiducloud_python_sdk_core.http import http_methods
14
14
  from baiducloud_python_sdk_blb.models.billing_change_post_to_pre_blb_response import BillingChangePostToPreBlbResponse
15
15
  from baiducloud_python_sdk_blb.models.billing_change_pre_to_post_blb_response import BillingChangePreToPostBlbResponse
16
+ from baiducloud_python_sdk_blb.models.blb_inquiry_response import BlbInquiryResponse
16
17
  from baiducloud_python_sdk_blb.models.resize_blb_response import ResizeBlbResponse
17
18
 
18
19
  _logger = logging.getLogger(__name__)
@@ -137,14 +138,16 @@ class BlbClient(BceBaseClient):
137
138
  :param config: Optional request configuration override
138
139
  :type config: baiducloud_python_sdk_core.BceClientConfiguration
139
140
 
140
- :return: API response
141
- :rtype: baiducloud_python_sdk_core.bce_response.BceResponse
141
+ :return: API response containing BlbInquiryResponse data
142
+ :rtype: BlbInquiryResponse
142
143
 
143
144
  :raises BceClientError: Client error (network failure, invalid parameters, etc.)
144
145
  :raises BceServerError: Server error (4xx/5xx HTTP status codes)
145
146
  """
146
147
  path = utils.append_uri(BlbClient.VERSION_V1, BlbClient.CONSTANT_BLB, BlbClient.CONSTANT_PRICE)
147
- return self._send_request(http_methods.POST, path=path, body=request.to_json_string(), config=config)
148
+ return self._send_request(
149
+ http_methods.POST, path=path, body=request.to_json_string(), config=config, model=BlbInquiryResponse
150
+ )
148
151
 
149
152
  def refund_blb(self, request, config=None):
150
153
  """
@@ -0,0 +1,62 @@
1
+ """
2
+ Request entity for BlbInquiryResponse information.
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.bce_response import BceResponse
6
+ from baiducloud_python_sdk_blb.models.price import Price
7
+
8
+
9
+ class BlbInquiryResponse(BceResponse):
10
+ """
11
+ BlbInquiryResponse
12
+ """
13
+
14
+ def __init__(self, prices=None):
15
+ """
16
+ Initialize BlbInquiryResponse response.
17
+
18
+ :param prices: 返回的价格信息
19
+ :type prices: List[Price] (optional)
20
+ """
21
+ super().__init__()
22
+ self.prices = prices
23
+
24
+ def to_dict(self):
25
+ """
26
+ Convert the response instance to a dictionary representation.
27
+
28
+ Includes metadata from the parent BceResponse class.
29
+ Nested model objects are recursively converted to dictionaries.
30
+
31
+ :return: Dictionary representation of the response
32
+ :rtype: dict
33
+ """
34
+ _map = super().to_dict()
35
+ if _map is not None:
36
+ return _map
37
+ result = dict()
38
+ if self.metadata is not None:
39
+ result['metadata'] = self.metadata
40
+ if self.prices is not None:
41
+ result['prices'] = [i.to_dict() for i in self.prices]
42
+ return result
43
+
44
+ def from_dict(self, m):
45
+ """
46
+ Populate the response instance from a dictionary.
47
+
48
+ Nested dictionaries are recursively converted to model objects.
49
+
50
+ :param m: Dictionary containing response data
51
+ :type m: dict
52
+
53
+ :return: Self reference for method chaining
54
+ :rtype: BlbInquiryResponse
55
+
56
+ :raises TypeError: If input is not a dictionary or field type mismatch
57
+ :raises ValueError: If nested model conversion fails
58
+ """
59
+ m = m or dict()
60
+ if m.get('prices') is not None:
61
+ self.prices = [Price().from_dict(i) for i in m.get('prices')]
62
+ return self
@@ -0,0 +1,82 @@
1
+ """
2
+ Price information
3
+ """
4
+
5
+ from baiducloud_python_sdk_core.abstract_model import AbstractModel
6
+
7
+
8
+ class Price(AbstractModel):
9
+ """
10
+ Price
11
+ """
12
+
13
+ def __init__(self, charge_item=None, discount_price=None, original_price=None, charge_unit=None):
14
+ """
15
+ Initialize Price instance.
16
+
17
+ :param charge_item: 计费项,比如取值\"instance\"代表实例费用;比如\"netraffic\"代表流量费用
18
+ :type charge_item: str (optional)
19
+
20
+ :param discount_price: 折扣价,单位都是元。预付费的时候,返回值比如:\"150\",后付费的时候,返回值比如:\"0.00028\"
21
+ :type discount_price: str (optional)
22
+
23
+ :param original_price: 原价
24
+ :type original_price: str (optional)
25
+
26
+ :param charge_unit: 计费单位。后付费的时候取值,比如\"minute\"。minute:表示计价单元是按每分钟来计算。GB:表示计价单元是按每GB来计算。 \"lcu\"代表按每lcu单位计费
27
+ :type charge_unit: str (optional)
28
+ """
29
+ super().__init__()
30
+ self.charge_item = charge_item
31
+ self.discount_price = discount_price
32
+ self.original_price = original_price
33
+ self.charge_unit = charge_unit
34
+
35
+ def to_dict(self):
36
+ """
37
+ Convert the model instance to a dictionary representation.
38
+
39
+ Nested model objects are recursively converted to dictionaries.
40
+
41
+ :return: Dictionary representation of the model
42
+ :rtype: dict
43
+ """
44
+ _map = super().to_dict()
45
+ if _map is not None:
46
+ return _map
47
+ result = dict()
48
+ if self.charge_item is not None:
49
+ result['chargeItem'] = self.charge_item
50
+ if self.discount_price is not None:
51
+ result['discountPrice'] = self.discount_price
52
+ if self.original_price is not None:
53
+ result['originalPrice'] = self.original_price
54
+ if self.charge_unit is not None:
55
+ result['chargeUnit'] = self.charge_unit
56
+ return result
57
+
58
+ def from_dict(self, m):
59
+ """
60
+ Populate the model instance from a dictionary.
61
+
62
+ Nested dictionaries are recursively converted to model objects.
63
+
64
+ :param m: Dictionary containing model data
65
+ :type m: dict
66
+
67
+ :return: Self reference for method chaining
68
+ :rtype: Price
69
+
70
+ :raises TypeError: If input is not a dictionary type
71
+ :raises ValueError: If nested model conversion fails
72
+ """
73
+ m = m or dict()
74
+ if m.get('chargeItem') is not None:
75
+ self.charge_item = m.get('chargeItem')
76
+ if m.get('discountPrice') is not None:
77
+ self.discount_price = m.get('discountPrice')
78
+ if m.get('originalPrice') is not None:
79
+ self.original_price = m.get('originalPrice')
80
+ if m.get('chargeUnit') is not None:
81
+ self.charge_unit = m.get('chargeUnit')
82
+ return self
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.1
2
2
  Name: baiducloud-python-sdk-blb
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: Baidu Cloud blbApi SDK Library for Python
5
5
  Home-page: https://github.com/baidubce/baiducloud-python-sdk
6
6
  Author: Baidu Cloud SDK
@@ -10,6 +10,7 @@ Project-URL: Source, https://github.com/baidubce/baiducloud-python-sdk
10
10
  Project-URL: Documentation, https://github.com/baidubce/baiducloud-python-sdk/tree/master/docs
11
11
  Project-URL: Changelog, https://github.com/baidubce/baiducloud-python-sdk/blob/master/baiducloud-python-sdk-blb/ChangeLog.md
12
12
  Keywords: baiducloud,blb
13
+ Platform: UNKNOWN
13
14
  Classifier: Development Status :: 5 - Production/Stable
14
15
  Classifier: Intended Audience :: Developers
15
16
  Classifier: License :: OSI Approved :: Apache Software License
@@ -29,21 +30,6 @@ Classifier: Programming Language :: Python :: 3.11
29
30
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4
30
31
  Description-Content-Type: text/markdown
31
32
  License-File: LICENSE
32
- Requires-Dist: pycryptodome>=3.8.0
33
- Requires-Dist: future>=0.6.0
34
- Requires-Dist: six>=1.4.0
35
- Dynamic: author
36
- Dynamic: classifier
37
- Dynamic: description
38
- Dynamic: description-content-type
39
- Dynamic: home-page
40
- Dynamic: keywords
41
- Dynamic: license
42
- Dynamic: license-file
43
- Dynamic: project-url
44
- Dynamic: requires-dist
45
- Dynamic: requires-python
46
- Dynamic: summary
47
33
 
48
34
  English | [简体中文](README-CN.md)
49
35
 
@@ -83,3 +69,4 @@ Detailed changes for each release are documented in the [release notes](./Change
83
69
  ## License
84
70
 
85
71
  [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
72
+
@@ -22,6 +22,8 @@ baiducloud_python_sdk_blb/models/billing_change_post_to_pre_blb_response.py
22
22
  baiducloud_python_sdk_blb/models/billing_change_pre_to_post_blb_request.py
23
23
  baiducloud_python_sdk_blb/models/billing_change_pre_to_post_blb_response.py
24
24
  baiducloud_python_sdk_blb/models/blb_inquiry_request.py
25
+ baiducloud_python_sdk_blb/models/blb_inquiry_response.py
26
+ baiducloud_python_sdk_blb/models/price.py
25
27
  baiducloud_python_sdk_blb/models/refund_blb_request.py
26
28
  baiducloud_python_sdk_blb/models/reservation.py
27
29
  baiducloud_python_sdk_blb/models/resize_blb_request.py
@@ -1,2 +0,0 @@
1
- 2026-03-20 Version: 0.0.1
2
- - 【blb】python sdk自动生成