{"id":28327,"library":"tencentcloud-sdk-python-cmq","title":"Tencent Cloud CMQ SDK for Python","description":"Tencent Cloud CMQ SDK for Python, part of the Tencent Cloud Python SDK suite. Current version 3.0.1459. Provides client interfaces for Tencent Cloud Message Queue (CMQ) services. Part of a large multi-package SDK with regular releases.","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","cmq","message-queue","cloud"],"install":[{"cmd":"pip install tencentcloud-sdk-python-cmq","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Core SDK components (credential, HTTP, auth) required for all services.","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Wrong import path; the client class resides under the versioned subpackage.","wrong":"from tencentcloud.cmq import CmqClient","symbol":"CmqClient","correct":"from tencentcloud.cmq.v20190304 import cmq_client"}],"quickstart":{"code":"from tencentcloud.common import credential\nfrom tencentcloud.cmq.v20190304 import cmq_client, models\n\ncred = credential.Credential(secret_id=\"your-secret-id\", secret_key=\"your-secret-key\")\nclient = cmq_client.CmqClient(cred, \"ap-guangzhou\")\nreq = models.CreateQueueRequest()\nreq.QueueName = \"test-queue\"\nresp = client.CreateQueue(req)\nprint(resp.RequestId)","lang":"python","description":"Initialize a CMQ client with credential and region, then create a queue."},"warnings":[{"fix":"Import from the versioned subpackage: from tencentcloud.cmq.v20190304 import cmq_client","message":"Do NOT import from 'tencentcloud.cmq' without version; always use 'tencentcloud.cmq.v20190304'. The top-level cmq package does NOT contain client classes.","severity":"gotcha","affected_versions":"all 3.x"},{"fix":"Run: pip install tencentcloud-sdk-python-common","message":"The 'tencentcloud-sdk-python-common' package is an implicit dependency but not automatically installed by pip. You must install it separately.","severity":"gotcha","affected_versions":"all 3.x"},{"fix":"Use Python 3.6+ or install the legacy SDK (tencentcloud-sdk-python) with version <3.0.","message":"SDK v3 dropped support for Python 2.7. If you are still on Python 2, pin to legacy v1 SDK (tencentcloud-sdk-python-intl-en or cn).","severity":"breaking","affected_versions":"3.0+"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install tencentcloud-sdk-python-common","cause":"Missing 'tencentcloud-sdk-python-common' which provides core package.","error":"ModuleNotFoundError: No module named 'tencentcloud'"},{"fix":"pip install tencentcloud-sdk-python-cmq","cause":"The SDK packages are installed separately; cmq v20190304 is not included unless you install 'tencentcloud-sdk-python-cmq'.","error":"AttributeError: module 'tencentcloud.cmq' has no attribute 'v20190304'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}