{"id":28326,"library":"tencentcloud-sdk-python-clb","title":"Tencent Cloud CLB SDK for Python","description":"Official Tencent Cloud SDK for Cloud Load Balancer (CLB). Version 3.1.82. Released on a regular cadence aligned with Tencent Cloud API updates.","status":"active","version":"3.1.82","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","sdk","clb","load-balancer"],"install":[{"cmd":"pip install tencentcloud-sdk-python-clb","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Common SDK utilities (client, credential, profile)","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"The SDK is organized by product and version; always import the specific module for CLB.","wrong":"import tencentcloud-sdk-python-clb","symbol":"ClbClient","correct":"from tencentcloud.clb.v20180317 import clb_client"},{"note":"The version (v20180317) is part of the module path; omitting it causes ImportError.","wrong":"from tencentcloud.clb import ClbClient","symbol":"ClbClient","correct":"from tencentcloud.clb.v20180317 import clb_client"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.profile.client_profile import ClientProfile\nfrom tencentcloud.common.profile.http_profile import HttpProfile\nfrom tencentcloud.clb.v20180317 import clb_client, models\n\nSecretId = os.environ.get('TENCENTCLOUD_SECRET_ID', '')\nSecretKey = os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n\ncred = credential.Credential(SecretId, SecretKey)\nhttpProfile = HttpProfile()\nhttpProfile.endpoint = \"clb.tencentcloudapi.com\"\nclientProfile = ClientProfile(httpProfile=httpProfile)\nclient = clb_client.ClbClient(cred, 'ap-guangzhou', clientProfile)\n\nreq = models.DescribeLoadBalancersRequest()\nresp = client.DescribeLoadBalancers(req)\nprint(resp.to_json_string())","lang":"python","description":"Quickstart: Create a CLB client and list load balancers."},"warnings":[{"fix":"Use `from tencentcloud.clb.v20180317 import clb_client`.","message":"Do not import the SDK using the package name `tencentcloud-sdk-python-clb`; use the module path `tencentcloud.clb.v20180317`.","severity":"gotcha","affected_versions":"all"},{"fix":"Use official region IDs from Tencent Cloud documentation.","message":"The old `ap-shenzhen` region ID is deprecated; use `ap-guangzhou` or other valid regions.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Update imports to include the versioned module path (v20180317).","message":"Version 3.x reorganized modules; previously working imports like `from tencentcloud.clb import ClbClient` will break.","severity":"breaking","affected_versions":"3.0.0 and later"}],"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-clb tencentcloud-sdk-python-common`","cause":"Installed wrong package or missing dependency `tencentcloud-sdk-python-common`","error":"ModuleNotFoundError: No module named 'tencentcloud.clb'"},{"fix":"Use: `from tencentcloud.clb.v20180317 import clb_client`","cause":"Incorrect import path: missing version subpackage","error":"ImportError: cannot import name 'ClbClient' from 'tencentcloud.clb'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}