Tencent Cloud IoT Explorer SDK for Python

raw JSON →
3.1.89 verified Sat May 09 auth: no python

Official Tencent Cloud SDK for the IoT Explorer service (explorer module). Current version 3.1.89, released 2025-05-09. Follows monthly release cadence synced with parent tencentcloud-sdk-python. Provides client classes for device management, data reporting, rule engine, and OTA.

pip install tencentcloud-sdk-python-iotexplorer
error ModuleNotFoundError: No module named 'tencentcloud'
cause Missing common package or incorrect install order.
fix
Run: pip install tencentcloud-sdk-python-iotexplorer (installs common automatically). If using monorepo, install tencentcloud-sdk-python-common explicitly.
error tencentcloud.common.exception.TencentCloudSDKException: UnsupportedRegion
cause Region not supported by IoT Explorer service.
fix
Use one of: ap-guangzhou, ap-shanghai, ap-beijing, ap-singapore. Check official docs for full list.
error AttributeError: 'IotexplorerClient' object has no attribute 'DescribeDevice'
cause Wrong import path or old SDK version that uses different method names.
fix
Ensure you imported from tencentcloud.iotexplorer.v20190423 and version is >=3.0.0.
breaking SDK v3 removed synchronous client methods; all API calls are now async. Use await or set run_async=False (deprecated).
fix Use async/await pattern or wrap in asyncio.run(). Example: resp = await client.DescribeDevice(req)
gotcha Versioned import paths (v20190423) are strictly required. Omitting the version causes ModuleNotFoundError.
fix Always use: from tencentcloud.iotexplorer.v20190423 import ...
gotcha Region endpoint must be specified; SDK does not default to global endpoint. Use 'ap-guangzhou' (Guangzhou) or your project region.
fix Pass region string to client constructor, e.g., IotexplorerClient(cred, 'ap-guangzhou')

Creates a client, authenticates via env vars, and describes a device.

import os
from tencentcloud.common import credential
from tencentcloud.iotexplorer.v20190423 import iotexplorer_client, models

# Authentication from environment variables
cred = credential.Credential(
    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),
    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')
)
client = iotexplorer_client.IotexplorerClient(cred, 'ap-guangzhou')

# Example: describe a device
req = models.DescribeDeviceRequest()
req.ProductId = 'YOUR_PRODUCT_ID'
req.DeviceName = 'YOUR_DEVICE_NAME'
try:
    resp = client.DescribeDevice(req)
    print(resp.to_json_string())
except Exception as e:
    print('Error:', e)