{"id":28343,"library":"tencentcloud-sdk-python-mariadb","title":"Tencent Cloud MariaDB SDK for Python","description":"Official Tencent Cloud SDK for accessing MariaDB services via the API. Current version 3.1.40, stable release. The SDK follows a predictable pattern per service, with package names mapping to `tencentcloud.${service}.${version}`.","status":"active","version":"3.1.40","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent cloud","mariadb","sdk","cloud","official"],"install":[{"cmd":"pip install tencentcloud-sdk-python-mariadb","lang":"bash","label":"Install the MariaDB SDK"}],"dependencies":[{"reason":"Required for credential handling and HTTP client.","package":"tencentcloud-sdk-python-common","optional":false},{"reason":"Used for HTTP transport.","package":"requests","optional":false}],"imports":[{"note":"Version qualifier is required in import path. 20170312 is the API version.","wrong":"from tencentcloud.mariadb import MariadbClient","symbol":"MariadbClient","correct":"from tencentcloud.mariadb.v20170312 import mariadb_client"},{"note":"Models must be imported from the versioned module.","wrong":"from tencentcloud.mariadb import models","symbol":"models","correct":"from tencentcloud.mariadb.v20170312 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.mariadb.v20170312 import mariadb_client, models\n\n# Replace with your credentials or use environment variables\ncred = credential.Credential(\n    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = mariadb_client.MariadbClient(cred, 'ap-guangzhou')\n\nreq = models.DescribeDBInstancesRequest()\nreq.Limit = 10\nresp = client.DescribeDBInstances(req)\nprint(resp.to_json_string())\n","lang":"python","description":"List MariaDB instances using the MariaDB client."},"warnings":[{"fix":"Always use the versioned import path: `from tencentcloud.mariadb.v20170312 import ...`","message":"The import path includes the API version number. Using an incorrect version may lead to missing methods or attributes.","severity":"gotcha","affected_versions":"all"},{"fix":"Set environment variables with `TENCENTCLOUD_` prefix or use the `Credential` constructor directly.","message":"Credential environment variables are `TENCENTCLOUD_SECRET_ID` and `TENCENTCLOUD_SECRET_KEY`. Do not use the older `SECRET_ID` or `SECRET_KEY` prefixes.","severity":"gotcha","affected_versions":">=3.0"},{"fix":"Access response attributes directly, e.g., `resp.TotalCount` instead of `resp.to_json_string()` if only specific fields are needed.","message":"Using `to_json_string()` on response objects is deprecated in newer SDK versions; prefer direct attribute access or the `__dict__` method.","severity":"deprecated","affected_versions":">=3.1.30"}],"env_vars":null,"search_vec":"'3.1.40':20 'access':12 'api':17 'cloud':2,9,40,43 'current':18 'follow':25 'map':34 'mariadb':3,13,41 'name':33 'offici':7,44 'packag':32 'pattern':28 'per':29 'predict':27 'python':6 'releas':22 'sdk':4,10,24,42 'servic':14,30,37 'stabl':21 'tencent':1,8,39 'tencentcloud':36 'version':19,38 'via':15","created_at":"2026-05-09T05:55:00.792955+00:00","updated_at":"2026-05-09T05:55:00.792955+00:00","problems":[{"fix":"Use from tencentcloud.mariadb.v20170312 import mariadb_client","cause":"Missing API version in import path.","error":"ImportError: cannot import name 'MariadbClient' from 'tencentcloud.mariadb'"},{"fix":"Verify that TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY environment variables are correct and not expired.","cause":"Expired or invalid credentials.","error":"tencentcloud.exception.TencentCloudSDKException: [FailedOperation] The request has been cancelled"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://www.tencentcloud.com","github":"https://github.com/TencentCloud/tencentcloud-sdk-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/tencentcloud-sdk-python-mariadb/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws"],"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}}