{"id":28364,"library":"tencentcloud-sdk-python-tcr","title":"Tencent Cloud TCR SDK for Python","description":"Official Tencent Cloud SDK for the Container Registry (TCR) service. Version 3.1.88 provides Python bindings for TCR API operations. Released as part of the tencentcloud-sdk-python family with frequent updates tracking the cloud API.","status":"active","version":"3.1.88","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","tcr","container-registry","sdk"],"install":[{"cmd":"pip install tencentcloud-sdk-python-tcr","lang":"bash","label":"Install TCR SDK"}],"dependencies":[{"reason":"Common SDK package required for authentication and base client","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Old import pattern without versioned module","wrong":"from tcr import TcrClient","symbol":"TcrClient","correct":"from tencentcloud.tcr.v20190924 import tcr_client"},{"note":"Models must be imported from the versioned path","wrong":"import models","symbol":"models","correct":"from tencentcloud.tcr.v20190924 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.tcr.v20190924 import tcr_client, models\n\ntry:\n    cred = credential.Credential(\n        os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n        os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n    )\n    client = tcr_client.TcrClient(cred, 'ap-guangzhou')\n    req = models.DescribeInstancesRequest()\n    resp = client.DescribeInstances(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as err:\n    print(err)","lang":"python","description":"List TCR instances. Requires SecretId and SecretKey set in environment variables."},"warnings":[{"fix":"Use 'from tencentcloud.tcr.v20190924 import tcr_client' instead of 'from tencentcloud.tcr import tcr_client'.","message":"Always use the versioned import path (v20190924). The SDK is generated per API version and imports without the version may break.","severity":"breaking","affected_versions":"All versions"},{"fix":"Run 'pip install tencentcloud-sdk-python-common' before using the TCR client.","message":"The common SDK package (tencentcloud-sdk-python-common) must be installed separately. It is not an automatic dependency of the TCR package.","severity":"breaking","affected_versions":"All versions"},{"fix":"Always provide region as the second argument to TcrClient (e.g., 'ap-guangzhou').","message":"Region parameter is required when initializing the client. Leaving it empty may cause unexpected behavior.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install tencentcloud-sdk-python-common'.","cause":"Missing tencentcloud-sdk-python-common package.","error":"ModuleNotFoundError: No module named tencentcloud.common.exception"},{"fix":"Check the exact module structure; the correct import is 'from tencentcloud.tcr.v20190924 import tcr_client' where the module file is named 'tcr_client.py'.","cause":"Incorrect import path; the module might be named differently.","error":"from tencentcloud.tcr.v20190924 import tcr_client\nImportError: cannot import name 'tcr_client' from 'tencentcloud.tcr.v20190924'"},{"fix":"Provide a valid region string, e.g., 'ap-guangzhou' or 'ap-beijing'.","cause":"Region parameter is missing or invalid.","error":"tencentcloud.common.exception.TencentCloudSDKException: [InvalidParameter] The region is not supported"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}