{"id":28340,"library":"tencentcloud-sdk-python-iot","title":"Tencent Cloud IoT Python SDK","description":"Provides Python access to Tencent Cloud IoT services (IoT Hub, IoT Explorer). Current version 3.0.1459. Released at the same cadence as TencentCloud SDK core (weekly).","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","iot","cloud-sdk"],"install":[{"cmd":"pip install tencentcloud-sdk-python-iot","lang":"bash","label":"py3"}],"dependencies":[{"reason":"Required: provides base client and credential handling","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"The package uses dashed names, but imports use dotted paths with versioned modules.","wrong":"from tencentcloud_sdk_python_iot import ...","symbol":"IotClient","correct":"from tencentcloud.iot.v20180123 import iot_client"},{"note":"Models are version-specific; v20180123 is the current stable API version.","wrong":"from tencentcloud.iot import models","symbol":"models","correct":"from tencentcloud.iot.v20180123 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.iot.v20180123 import iot_client, models\n\nsecret_id = os.environ.get('TENCENTCLOUD_SECRET_ID', '')\nsecret_key = os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\ncred = credential.Credential(secret_id, secret_key)\nclient = iot_client.IotClient(cred, 'ap-guangzhou')\nreq = models.DescribeProductsRequest()\nresp = client.DescribeProducts(req)\nprint(resp.to_json_string())","lang":"python","description":"List IoT products using credentials from environment variables."},"warnings":[{"fix":"Check the official documentation for the correct API version string.","message":"Import paths include the API version (e.g., v20180123). Using an incorrect or outdated version will cause AttributeErrors.","severity":"gotcha","affected_versions":"all"},{"fix":"Run: pip install tencentcloud-sdk-python-common","message":"The package tencentcloud-sdk-python-iot does NOT include the common SDK; you must also install tencentcloud-sdk-python-common.","severity":"gotcha","affected_versions":"all"},{"fix":"Use snake_case import: from tencentcloud.iot.v20180123 import iot_client","message":"Old imports using camelCase module names (e.g., IotClient) are deprecated in favor of snake_case (iot_client).","severity":"deprecated","affected_versions":">=3.0"},{"fix":"Use 'from tencentcloud.common import credential' then credential.Credential(...)","message":"In SDK v3+, the credential class moved to tencentcloud.common.credential (was tencentcloud.common).","severity":"breaking","affected_versions":">=2.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install both: pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-iot","cause":"Missing common SDK package.","error":"ModuleNotFoundError: No module named 'tencentcloud'"},{"fix":"Verify API version from docs and install the correct package.","cause":"Using an incorrect API version string or the package is not installed.","error":"AttributeError: module 'tencentcloud.iot' has no attribute 'v20180123'"},{"fix":"Check region availability for IoT service.","cause":"Using an endpoint that does not exist for the IoT service in the current region.","error":"tencentcloud.common.exception.TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedOperation"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}