Registry / aws / tencentcloud-sdk-python-tcb

tencentcloud-sdk-python-tcb

JSON →
library3.1.92pypypi✓ verified 84d ago

The official Tencent Cloud Python SDK for the Tencent Cloud Base (TCB) service. Version 3.1.92 provides APIs for managing cloud functions, databases, storage, and static hosting. Released frequently in sync with the main tencentcloud-sdk-python package.

pip install tencentcloud-sdk-python-tcb
INSTALL
IMPORT
SIG · TENCENTCLOUD-SDK-P
T
tencentcloud-sdk-python-tcb
awspythonv3.1.92
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TcbClient
from tencentcloud.tcb.v20180608 import tcb_client
from tencentcloud.tcb import TcbClient
Must specify version (v20180608) and import the client class from the module directly.
models
from tencentcloud.tcb.v20180608 import models
import tencentcloud.tcb.models
Models must be imported from the versioned subpackage.

Initialize TCB client and describe environments.

import os from tencentcloud.common import credential from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.tcb.v20180608 import tcb_client, models try: cred = credential.Credential(secret_id=os.environ.get('TENCENTCLOUD_SECRET_ID'), secret_key=os.environ.get('TENCENTCLOUD_SECRET_KEY')) client = tcb_client.TcbClient(cred, 'ap-guangzhou') req = models.DescribeEnvsRequest() resp = client.DescribeEnvs(req) print(resp) except TencentCloudSDKException as e: print(e)
Debug
Known issues
gotchaThe TCB SDK uses a versioned API endpoint (v20180608). Do not import directly from tencentcloud.tcb without the version subpackage.
fix
Always import from tencentcloud.tcb.v20180608.
affects: all
breakingOlder versions (pre-3.0) had different import paths and client initialization. Upgrading from 2.x to 3.x requires changing all imports.
fix
Update import paths to include version subpackage (v20180608) and use new client classes.
affects: <3.0
gotchaThe TCB SDK is a separate package. Installing tencentcloud-sdk-python alone does not include TCB; you must install tencentcloud-sdk-python-tcb explicitly.
fix
Run pip install tencentcloud-sdk-python-tcb.
affects: all
deprecatedEndpoint configuration via environment variable TENCENTCLOUD_ENDPOINT may be deprecated in future versions. Always set the region in the client constructor.
fix
Use the 'region' parameter when creating TcbClient.
affects: 3.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud'
Missing common package or TCB SDK not installed.
fix
Install both: pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-tcb
AttributeError: module 'tencentcloud.tcb' has no attribute 'TcbClient'
Importing directly from tencentcloud.tcb instead of the versioned subpackage.
fix
Use: from tencentcloud.tcb.v20180608 import tcb_client
tencentcloud.common.exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedRegion
The region provided is not valid or not supported by TCB service.
fix
Check supported regions and provide a valid region like 'ap-guangzhou'.
Upgrade
Version history
3.1.92latest on PyPI · released May 7, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for common classes like Credential and client exceptions
Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
tencentcloud-sdk-python-tcb — pip install tencentcloud-sdk-python-tcb · libregistry