{"id":46590,"library":"tencentcloud-sdk-python-cdb","title":"Tencent Cloud SDK - CDB (MySQL/Percona/MariaDB)","description":"Official Tencent Cloud SDK module for managing Cloud Database (CDB) services, including MySQL, Percona, and MariaDB instances. Current version 3.1.108. Released approximately weekly.","status":"active","version":"3.1.108","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent","cloud","cdb","mysql","database","sdk"],"install":[{"cmd":"pip install tencentcloud-sdk-python-cdb","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core SDK common module required for authentication and client base classes","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Module structure requires versioned package (v20170320). The top-level 'cdb' does not have CdbClient.","wrong":"from tencentcloud.cdb import CdbClient","symbol":"CdbClient","correct":"from tencentcloud.cdb.v20170320 import cdb_client"},{"note":"Models are under 'models' submodule, not directly importable.","wrong":"from tencentcloud.cdb.v20170320 import DescribeDBInstancesRequest","symbol":"DescribeDBInstancesRequest","correct":"from tencentcloud.cdb.v20170320 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.cdb.v20170320 import cdb_client, models\n\ncred = credential.Credential(\n    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = cdb_client.CdbClient(cred, 'ap-guangzhou')\nreq = models.DescribeDBInstancesRequest()\nresp = client.DescribeDBInstances(req)\nprint(resp)\n","lang":"python","description":"List CDB instances using environment variables for credentials."},"warnings":[{"fix":"Always check the API version used (e.g., v20170320) and ensure your code matches the SDK's bundled version.","message":"API version changed from v20170320? The SDK modules are tied to a specific API version. Do not mix versions or expect backward compatibility across major SDK upgrades.","severity":"breaking","affected_versions":"All versions"},{"fix":"Install both: pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-cdb","message":"The SDK requires both tencentcloud-sdk-python-common and the specific service package (e.g., -cdb). Installing only -cdb will not provide the common module.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use 'from tencentcloud.cdb.v20170320 import cdb_client' instead.","message":"Old import patterns like 'from tencentcloud.cdb import CdbClient' are deprecated. The correct path includes the versioned subpackage.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"search_vec":"'3.1.108':25 'approxim':27 'cdb':4,15,31 'cloud':2,8,13,30 'current':23 'databas':14,33 'includ':17 'instanc':22 'manag':12 'mariadb':21 'modul':10 'mysql':18,32 'mysql/percona/mariadb':5 'offici':6 'percona':19 'releas':26 'sdk':3,9,34 'servic':16 'tencent':1,7,29 'version':24 'week':28","created_at":"2026-06-07T13:00:40.516909+00:00","updated_at":"2026-06-07T13:00:40.516909+00:00","problems":[{"fix":"pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-cdb","cause":"Missing tencentcloud-sdk-python-common or base package.","error":"ModuleNotFoundError: No module named 'tencentcloud'"},{"fix":"Use: from tencentcloud.cdb.v20170320 import cdb_client","cause":"Importing from wrong module path; CdbClient is under versioned subpackage.","error":"AttributeError: module 'tencentcloud.cdb' has no attribute 'CdbClient'"},{"fix":"Use: from tencentcloud.cdb.v20170320 import models; req = models.DescribeDBInstancesRequest()","cause":"Trying to import model directly from the versioned package instead of models submodule.","error":"ImportError: cannot import name 'DescribeDBInstancesRequest' from 'tencentcloud.cdb.v20170320'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/TencentCloud/tencentcloud-sdk-python","github":"https://github.com/TencentCloud/tencentcloud-sdk-python","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}