Skip to content

Commit 74d137d

Browse files
author
BitsAdmin
committed
Merge branch 'dev/lsx/endpoint' into 'integration_2025-04-28_881197335810'
feat: [development task] core endpoint (1191536) See merge request iaasng/volcengine-python-sdk!585
2 parents 3dbfc62 + 89a6f2e commit 74d137d

File tree

8 files changed

+502
-29
lines changed

8 files changed

+502
-29
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Volcengine SDK for Python
22

3+
## 非兼容升级通知
4+
5+
Volcengine SDK for Python 非兼容升级通知
6+
7+
影响版本:`2.0.1` 以及后续版本
8+
9+
变更描述:
10+
11+
`2.0.1` 版本开始,发起请求将默认从使用 `HTTP` 协议变成使用 `HTTPS` 协议,请升级到新版本的用户注意是否会产生兼容性风险,做好充分测试。如需继续使用
12+
`HTTP` 协议,请在发起请求时指定 `scheme` 参数为 `http`(不推荐):
13+
14+
```python
15+
import volcenginesdkcore
16+
17+
configuration = volcenginesdkcore.Configuration()
18+
configuration.scheme = 'http'
19+
```
20+
321
## Table of Contents
422

523
* Requirements

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"lasted": "1.1.7",
3-
"meta_commit": "1ed3b19001ed9532734889718c943871265578b9"
2+
"lasted": "2.0.1",
3+
"meta_commit": "e569c53451766ea98feea2f7d87071761ee8abf3"
44
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages # noqa: H301
44

55
NAME = "volcengine-python-sdk"
6-
VERSION = "1.1.7"
6+
VERSION = "2.0.1"
77
# To install the library, run the following
88
#
99
# python setup.py install

volcenginesdkcore/api_client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
6363
self.default_headers[header_name] = header_value
6464
self.cookie = cookie
6565
# Set default User-Agent.
66-
self.user_agent = 'volcstack-python-sdk/1.1.7'
66+
self.user_agent = 'volcstack-python-sdk/2.0.1'
6767
self.client_side_validation = configuration.client_side_validation
6868

6969
self.interceptor_chain = InterceptorChain()
@@ -105,6 +105,12 @@ def __call_api(
105105
_return_http_data_only=None, collection_formats=None,
106106
_preload_content=True, _request_timeout=None):
107107

108+
# header parameters
109+
header_params = header_params or {}
110+
header_params.update(self.default_headers)
111+
if self.cookie:
112+
header_params['Cookie'] = self.cookie
113+
108114
interceptor_context = InterceptorContext(request=Request(
109115
self.configuration,
110116
resource_path, method, path_params,

volcenginesdkcore/configuration.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,15 @@ def __init__(self):
5858

5959
# Default Base url
6060
self.host = None
61+
62+
# Custom bootstrap region dict
63+
self.custom_bootstrap_region = None
64+
65+
# use dual stack endpoint rule
66+
self.use_dual_stack = None
67+
6168
# Scheme Support http or https
62-
self.scheme = "http"
69+
self.scheme = "https"
6370
# Temp file folder for downloading files
6471
self.temp_folder_path = None
6572

@@ -250,5 +257,5 @@ def to_debug_report(self):
250257
"OS: {env}\n" \
251258
"Python Version: {pyversion}\n" \
252259
"Version of the API: 0.1.0\n" \
253-
"SDK Package Version: 1.1.7".\
260+
"SDK Package Version: 2.0.1". \
254261
format(env=sys.platform, pyversion=sys.version)

0 commit comments

Comments
 (0)