Skip to main content

byteplus SDK for Python

⚠️ 已知缺陷说明(历史版本)

在 byteplus-python-sdk-v2 的部分历史版本(3.0.1 ~ 3.0.23,含)中,发现 SDK 内置的重试机制存在缺陷。

当请求过程中出现异常(如网络抖动、接口返回错误等)时,SDK 虽会触发重试逻辑,但由于该缺陷,重试未能实际生效,客户端仍可能直接感知到首次请求异常,导致重试机制无法有效提升请求成功率。

影响范围

  • SDK:byteplus-python-sdk-v2
  • 受影响版本:3.0.1 ~ 3.0.23(含)

影响说明

对于依赖 SDK 内置重试机制来应对瞬时异常或网络不稳定场景的业务:

  • 实际请求可用性可能低于预期
  • 重试相关配置无法发挥应有的保障作用

解决方案与建议

该问题已在 3.0.24 及以上版本中修复。
强烈建议所有用户升级至 byteplus-python-sdk-v2 ≥ 3.0.24,以确保请求重试机制在异常场景下能够正常生效。

非兼容升级通知

Byteplus SDK for Python 非兼容升级通知

影响版本:2.0.1 以及后续版本

变更描述:

从 2.0.1 版本开始,发起请求将默认从使用 HTTP 协议变成使用 HTTPS 协议,请升级到新版本的用户注意是否会产生兼容性风险,做好充分测试。如需继续使用 HTTP 协议,请在发起请求时指定 scheme 参数为 http(不推荐):

import byteplussdkcore

configuration = byteplussdkcore.Configuration()
configuration.scheme = 'http'

Table of Contents

  • Requirements
  • Install
  • Usage

Requirements

Python version >=2.7。

Install

Install via pip

pip install byteplus-python-sdk-v2

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Usage

1:config Configuration

configuration = byteplussdkcore.Configuration()
configuration.client_side_validation = True
configuration.schema = "http"
configuration.debug = False
configuration.logger_file = "sdk.log"

byteplussdkcore.Configuration.set_default(configuration)

SDK Documentation

Credentials →


SDK Integration

When calling APIs, it is recommended to integrate the SDK in your project. Using the SDK simplifies development, speeds up integration, and reduces long-term maintenance costs.

Requirements

  1. Python version >= 2.7.
  2. If using Ark runtime (byteplussdkarkruntime), Python version >= 3.6 is required.

Table of Contents

  1. Credentials — AK/SK, STS, AssumeRole, OIDC, SAML, ECS Role, Default Chain
  2. Endpoint Configuration — Custom Endpoint, RegionId, Automatic Resolution
  3. Transport — HTTP Connection Pool, HTTPS Scheme, SSL Verification, HTTP(S) Proxy
  4. Timeout — Request Timeout Configuration
  5. Retry — Retry Strategy, Backoff Strategy
  6. Error Handling — Exception Handling
  7. Debugging — Debug Mode, Log Output
  8. Environment Variables — Environment Variable Configuration

Security and privacy

This project takes security seriously. For vulnerability reporting and supported versions, see SECURITY.md

Metadata

Release files for byteplus-python-sdk-v2 3.0.61

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for byteplus-python-sdk-v2 3.0.61
File Size Uploaded
byteplus_python_sdk_v2-3.0.61.tar.gz 4.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for byteplus-python-sdk-v2 3.0.61
File Interpreter ABI Platform
byteplus_python_sdk_v2-3.0.61-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 23.4 MB

Release files / byteplus_python_sdk_v2-3.0.61.tar.gz

Download URL byteplus_python_sdk_v2-3.0.61.tar.gz
Size 4.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a494e4ff587f6e3c8b30071cf115028ead04beac11960549355c702d0193edba
BLAKE2b-256 checksum
How to use checksums
1d241078a6776afef8cf1e48302033bdde05cff26ffb49991a55d3f8adb5fe58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.2

Release files / byteplus_python_sdk_v2-3.0.61-py2.py3-none-any.whl

Download URL byteplus_python_sdk_v2-3.0.61-py2.py3-none-any.whl
Size 18.5 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bac44cae51d99238c23e69a8201268de0bdfefd3c7857f167f60fdfbfbe20308
BLAKE2b-256 checksum
How to use checksums
d6b62739d5b32b334e4d34f22631efdccd607744b2821a87d30f3b50669929a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.2

Release history Release notifications | RSS feed

This release

3.0.61 This release

2 release files

3.0.59

2 release files

3.0.56

2 release files

3.0.55

2 release files

3.0.54

2 release files

3.0.51

2 release files

3.0.50

2 release files

3.0.49

2 release files

3.0.47

2 release files

3.0.46

2 release files

3.0.45

2 release files

3.0.44

2 release files

3.0.42

2 release files

3.0.39

2 release files

3.0.38

2 release files

3.0.37

2 release files

3.0.35

2 release files

3.0.34

2 release files

3.0.32

2 release files

3.0.29

2 release files

3.0.28

1 release file

3.0.27

1 release file

3.0.26

1 release file

3.0.25

1 release file

3.0.24

1 release file

3.0.19

1 release file

3.0.18

1 release file

3.0.17

1 release file

3.0.16

1 release file

3.0.15

1 release file

3.0.14

1 release file

3.0.13

1 release file

3.0.12

1 release file

3.0.11

1 release file

3.0.10

1 release file

3.0.9

1 release file

3.0.8

1 release file

3.0.7

1 release file

3.0.6

1 release file

3.0.5

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.2

1 release file

2.0.1

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page