Skip to main content

Byteplus SDK for Python

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

byteplus_python_sdk_v2-3.0.47.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

byteplus_python_sdk_v2-3.0.47-py2.py3-none-any.whl (14.4 MB view details)

Uploaded Python 2Python 3

File details

Details for the file byteplus_python_sdk_v2-3.0.47.tar.gz.

File metadata

  • Download URL: byteplus_python_sdk_v2-3.0.47.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for byteplus_python_sdk_v2-3.0.47.tar.gz
Algorithm Hash digest
SHA256 81022a3814bd5958b0c3e77689256e34bee7e660da5ecba7f053da827a6e8b46
MD5 10f8ea9e2fc833b08bf059f7cfc46197
BLAKE2b-256 35906bf436a11e0a0842ac09778bf5b1f2eec390f16109d3d5cc9322249df35b

See more details on using hashes here.

File details

Details for the file byteplus_python_sdk_v2-3.0.47-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for byteplus_python_sdk_v2-3.0.47-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b135939659030335f9e0607b32c58286a655efb20de6c1fdc40642d56567d09e
MD5 478e386193af0168a3a4e78348d7c6cd
BLAKE2b-256 e09384d158bae3a67f6b24e3d05f77cc2e41dc8252b14f2dc2780f830c224033

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page