Registry /
aws / tencentcloud-sdk-python-tem
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.
TemClient
✓ from tencentcloud.tem.v20210701 import tem_client, models
✗ from tencentcloud.tem import TemClient
You must import the specific versioned module (v20210701) and use tem_client.TemClient
models
✓ from tencentcloud.tem.v20210701 import models
Always import the models submodule from the same versioned path
List all TEM applications using versioned client and models.
import os
from tencentcloud.common import credential
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.tem.v20210701 import tem_client, models
try:
cred = credential.Credential(os.environ.get('TENCENTCLOUD_SECRET_ID', ''), os.environ.get('TENCENTCLOUD_SECRET_KEY', ''))
client = tem_client.TemClient(cred, "ap-guangzhou")
req = models.DescribeApplicationsRequest()
resp = client.DescribeApplications(req)
print(resp.to_json_string())
except TencentCloudSDKException as e:
print(e)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud.tem'
Forgetting to install the TEM-specific SDK package; only the common SDK is installed.
fixpip install tencentcloud-sdk-python-tem
AttributeError: module 'tencentcloud.tem' has no attribute 'tem_client'
Importing from the wrong path (unversioned import) instead of the versioned subpackage.
fixUse: from tencentcloud.tem.v20210701 import tem_client, models
tencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnauthorizedOperation
Invalid or missing credentials, or the API key does not have permission for TEM.
fixVerify TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY are set and that the account has TEM access.
Upgrade
Version history
3.0.1459latest on PyPI · released Sep 15, 2025
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for credentials and client initialization