Metadata-Version: 2.4
Name: byteplus-python-sdk-v2
Version: 3.0.69
Summary: BytePlus unified Python SDK v2 covering current cloud services. New projects should use this package; the legacy byteplus-sdk-python remains supported for existing integrations.
Home-page: https://github.com/byteplus-sdk/byteplus-python-sdk-v2
Author: byteplus-sdk
Author-email: sdk@byteplus.com
License: Apache License 2.0
Project-URL: Homepage, https://github.com/byteplus-sdk/byteplus-python-sdk-v2
Project-URL: Repository, https://github.com/byteplus-sdk/byteplus-python-sdk-v2
Project-URL: Documentation, https://github.com/byteplus-sdk/byteplus-python-sdk-v2/tree/main/docs
Platform: any
Requires-Python: >=2.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: NOTICE.md
Requires-Dist: byteplussdk-aidap==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-alb==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-apig==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-apig20221112==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-ark==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-arkruntime==3.0.69; python_version >= "3.8"
Requires-Dist: byteplussdk-autoscaling==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-billing==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-cen==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-clawsentry==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-clb==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-cloudmonitor==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-core==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-cpaas==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-cr==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-directconnect==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-dms==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-ecopartner==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-ecs==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-ecs20251101==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-escloud==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-filenas==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-hbase==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-iam20210801==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-id==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-kafka==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-kickart==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-kms==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-llmshield==3.0.69; python_version >= "3.8"
Requires-Dist: byteplussdk-milvus==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-mlplatform20240701==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-mongodb==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-mse==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-natgateway==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-privatelink==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-privatezone==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-quota==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-rabbitmq==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-rdsmssql==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-rdsmysqlv2==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-rdspostgresql==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-redis==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-resourcecenter==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-resourceshare==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-seccenter20240508==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-smc==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-storageebs==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-sts==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-tag==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-transitrouter==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vedbm==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vefaas==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vepfs==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vke==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vmp==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vod20250701==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vpc==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vpc20250901==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vpn==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vs==3.0.69; python_version >= "2.7"
Requires-Dist: byteplussdk-vs20260714==3.0.69; python_version >= "2.7"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# byteplus SDK for Python

> BytePlus unified Python SDK v2 (`byteplus-python-sdk-v2`, or the `byteplussdk-*` split packages), generated from OpenAPI. **New Python projects should use this package.** The legacy `byteplus-sdk-python` remains supported for existing integrations.
>
> - Install: `pip install byteplus-python-sdk-v2` (for a single service: `pip install byteplussdk-ecs`, see below)
> - Official docs: [SDK Integration Guide (English)](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/0-Overview.md) | [中文](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/0-Overview-zh.md)

## ⚠️ 已知缺陷说明（历史版本）

在 **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`(不推荐):

```python
import byteplussdkcore

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

## Table of Contents

* Requirements
* Install
* Usage

### Requirements ###

Python version >=2.7。

### Install ###

Install via pip

```sh
pip install byteplus-python-sdk-v2
```

`byteplus-python-sdk-v2` is the metapackage that installs all services. To install a single service on demand (for example ECS):

```sh
pip install byteplussdk-ecs
```

Split packages keep the same Python import paths (e.g. `import byteplussdkecs`). For ModelArk runtime, install:

```sh
pip install byteplussdk-arkruntime
```

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```

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

### Usage ###

Configure credentials via `byteplussdkcore.Configuration` (or the `BYTEPLUS_ACCESS_KEY` and `BYTEPLUS_SECRET_KEY` environment variables) and call any service API:

```python
import byteplussdkcore
import byteplussdkecs
from byteplussdkcore.rest import ApiException

configuration = byteplussdkcore.Configuration()
configuration.ak = "Your AK"
configuration.sk = "Your SK"
configuration.region = "ap-southeast-1"
configuration.client_side_validation = True
configuration.scheme = "https"
configuration.debug = False
configuration.logger_file = "sdk.log"

byteplussdkcore.Configuration.set_default(configuration)

api_instance = byteplussdkecs.ECSApi()
try:
    resp = api_instance.describe_instances(
        byteplussdkecs.DescribeInstancesRequest()
    )
    print(resp)
except ApiException as e:
    print("Exception when calling ECSApi->describe_instances: %s\n" % e)
```

## SDK Documentation

[Credentials →](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/1-Credentials.md)

---

# 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](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/1-Credentials.md) — AK/SK, STS, AssumeRole, OIDC, SAML, ECS Role, Default Chain
2. [Endpoint Configuration](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/2-Endpoint.md) — Custom Endpoint, RegionId, Automatic Resolution
3. [Transport](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/3-Transport.md) — HTTP Connection Pool, HTTPS Scheme, SSL Verification
4. [Proxy](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/4-Proxy.md) — HTTP(S) Proxy Configuration
5. [Timeout](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/5-Timeout.md) — Request Timeout Configuration
6. [Retry](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/6-Retry.md) — Retry Strategy, Backoff Strategy
7. [Error Handling](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/7-ErrorHandling.md) — Exception Handling
8. [Debugging](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/8-Debugging.md) — Debug Mode, Log Output
9. [Environment Variables](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/docs/EnvironmentVariables.md) — Environment Variable Configuration

## Security and privacy
This project takes security seriously.
For vulnerability reporting and supported versions, see [SECURITY.md](https://github.com/byteplus-sdk/byteplus-python-sdk-v2/blob/main/SECURITY.md)
