{"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,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}