Registry /
aws / tencentcloud-sdk-python-tbp
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.
TbpClient
✓ from tencentcloud.tbp.v20190627 import tbp_client
✗ from tencentcloud.tbp.v20190311 import tbp_client
Version 20190627 is the current API version; older versions may not exist or be deprecated.
Initialize client and call TextProcess.
import os
from tencentcloud.common import credential
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.tbp.v20190627 import tbp_client, models
secret_id = os.environ.get('TENCENTCLOUD_SECRET_ID', '')
secret_key = os.environ.get('TENCENTCLOUD_SECRET_KEY', '')
cred = credential.Credential(secret_id, secret_key)
client = tbp_client.TbpClient(cred, "ap-guangzhou")
req = models.TextProcessRequest()
req.BotId = "your_bot_id"
req.BotEnv = "dev"
req.TerminalId = "test_user"
req.InputText = "Hello"
try:
resp = client.TextProcess(req)
print(resp.to_json_string())
except TencentCloudSDKException as e:
print(e)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud'
Missing base package tencentcloud-sdk-python-common.
fixpip install tencentcloud-sdk-python-common
AttributeError: module 'tencentcloud.tbp' has no attribute 'v20190627'
Installed an older version that does not include v20190627.
fixUpgrade to the latest package: pip install --upgrade tencentcloud-sdk-python-tbp
tencentcloud.common.exception.TencentCloudSDKException: [InvalidParameter] The specified BotId does not exist.
Invalid BotId or BotEnv; check your TBP bot configuration.
fixVerify BotId and BotEnv in the Tencent Cloud console.
Upgrade
Version history
3.0.1459latest on PyPI · released Sep 15, 2025
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for all Tencent Cloud SDK usage.