Registry / aws / tencentcloud-sdk-python-emr

tencentcloud-sdk-python-emr

JSON →
library3.1.89pypypi✓ verified 83d ago

Official Tencent Cloud SDK for the Elastic MapReduce (EMR) service, enabling management of EMR clusters, jobs, and resources. Current version 3.1.89, updated frequently alongside the core SDK.

pip install tencentcloud-sdk-python-emr
INSTALL
IMPORT
SIG · TENCENTCLOUD-SDK-P
T
tencentcloud-sdk-python-emr
awspythonv3.1.89
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.

EmrClient
from tencentcloud.emr.v20190103 import emr_client
from tencentcloud.emr import EmrClient
The client class is nested under the versioned module.

Initialize client and list EMR clusters.

import os from tencentcloud.common import credential from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.emr.v20190103 import emr_client, models try: cred = credential.Credential( os.environ.get("TENCENTCLOUD_SECRET_ID", ""), os.environ.get("TENCENTCLOUD_SECRET_KEY", "") ) client = emr_client.EmrClient(cred, "ap-guangzhou") req = models.DescribeInstancesListRequest() req.DisplayStrategy = "clusterList" resp = client.DescribeInstancesList(req) print(resp.to_json_string()) except TencentCloudSDKException as err: print(err)
Debug
Known issues
gotchaRegion is required when initializing the client. Using an empty string or invalid region will raise TencentCloudSDKException.
fix
Always set a valid region (e.g., 'ap-guangzhou').
affects: all
breakingVersion 3.0.0 restructured the SDK into separate per-service packages. The emr package no longer contains common classes; import from tencentcloud-sdk-python-common.
fix
Install tencentcloud-sdk-python-emr and tencentcloud-sdk-python-common separately. Use 'from tencentcloud.common import credential'.
affects: >=3.0.0
deprecatedThe old 'emr_client.EmrClient' initialization using SecretId/SecretKey directly is deprecated in favor of the Credential object.
fix
Use credential.Credential(secret_id, secret_key) and pass it to the client.
affects: >=3.1.0
gotchaModel fields are snake_case in Python, but the API expects camelCase. The SDK handles conversion automatically when using to_json_string().
fix
Do not manually convert field names; use model instances with snake_case attributes.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud'
Missing required package tencentcloud-sdk-python-common.
fix
pip install tencentcloud-sdk-python-common
tencentcloud.common.exception.tencent_cloud_sdk_exception.TencentCloudSDKException: [TencentCloudSDKException] code: AuthFailure.SecretIdNotFound
Invalid or missing SecretId/SecretKey in environment or code.
fix
Set TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY environment variables correctly.
AttributeError: module 'tencentcloud.emr' has no attribute 'v20190103'
Import path is wrong; correct path uses dot notation.
fix
Use 'from tencentcloud.emr.v20190103 import emr_client'.
Upgrade
Version history
3.1.89latest on PyPI · released Apr 29, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for authentication and base client.
Agent activity
34 hits · last 30 days
node
32
Resources