Registry / aws / tencentcloud-sdk-python-vm

tencentcloud-sdk-python-vm

JSON →
library3.1.67pypypi✓ verified 83d ago

The Tencent Cloud VM (Video Moderation) SDK for Python enables integration with Tencent Cloud's content moderation services for video content. Current version 3.1.67. Release cadence is irregular, typically following Tencent Cloud API updates.

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

VmClient
from tencentcloud.vm.v20201229 import vm_client
from tencentcloud.cloud.vm import VmClient
Older imports used incorrect module paths; must use exact versioned path.
CreateVideoModerationTask
from tencentcloud.vm.v20201229 import models
Models are imported separately; not all versions have the same models.

Initialize a VM client and create a video moderation task.

from tencentcloud.common import credential from tencentcloud.vm.v20201229 import vm_client, models def moderate_video(): cred = credential.Credential( secret_id=os.environ.get('TENCENTCLOUD_SECRET_ID', ''), secret_key=os.environ.get('TENCENTCLOUD_SECRET_KEY', '') ) client = vm_client.VmClient(cred, 'ap-guangzhou') req = models.CreateVideoModerationTaskRequest() req.Operator = 'user' req.BizType = '' req.Type = 'VIDEO' req.Tasks = [{'DataId': '123', 'Input': {'Url': 'https://example.com/video.mp4'}}] resp = client.CreateVideoModerationTask(req) return resp
Debug
Known issues
breakingVersion 3.x uses new import paths (e.g., tencentcloud.vm.v20201229) instead of old 'tencentcloud.vm'.
fix
Update imports to include the API version in the path.
affects: 2.x -> 3.x
gotchaRegion must be set explicitly in client initialization; no default region.
fix
Always pass a region string (e.g., 'ap-guangzhou') to VmClient.
affects: all
gotchaThe SDK requires the 'tencentcloud-sdk-python-common' package; missing it causes ImportError.
fix
Install the common package: pip install tencentcloud-sdk-python-common
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud.vm'
Old import path used after version 3.x update.
fix
Use versioned import: from tencentcloud.vm.v20201229 import vm_client
tencentcloud.common.exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedRegion error: no available region
Region not set or invalid region.
fix
Pass a valid region (e.g., 'ap-guangzhou') to VmClient.
Upgrade
Version history
3.1.67latest on PyPI · released Mar 30, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for credential handling and API client base
Agent activity
31 hits · last 30 days
node
30
Resources