{"id":28339,"library":"tencentcloud-sdk-python-hcm","title":"Tencent Cloud HCM SDK for Python","description":"Tencent Cloud HCM (Human Cloud Matching) SDK for Python. Provides APIs for face recognition, human cloud matching, and related AI services. Current version 3.1.78. Release cadence follows the main tencentcloud-sdk-python monthly releases.","status":"active","version":"3.1.78","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent","cloud","hcm","sdk","ai"],"install":[{"cmd":"pip install tencentcloud-sdk-python-hcm","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for all Tencent Cloud SDKs; provides base client and authentication","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Version-specific import path; always include the API version v20181106","wrong":null,"symbol":"HcmClient","correct":"from tencentcloud.hcm.v20181106 import hcm_client"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.hcm.v20181106 import hcm_client, models\n\ncreds = credential.Credential(\n    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = hcm_client.HcmClient(creds, 'ap-guangzhou')\nreq = models.DescribeImageRequest()\n# set request parameters...\nresponse = client.DescribeImage(req)\nprint(response)","lang":"python","description":"Authenticate with environment variables and call a HCM API."},"warnings":[{"fix":"Install tencentcloud-sdk-python-hcm instead of the monolithic tencentcloud-sdk-python.","message":"Older SDK versions (before 3.x) used a different import pattern under 'tencentcloud-sdk-python' package directly. Ensure you use the per-service package.","severity":"deprecated","affected_versions":"<3.0"},{"fix":"Always use v20181106 for HCM. If unsure, check the module list: pip show tencentcloud-sdk-python-hcm","message":"The API version (v20181106) is part of the import path. Using the wrong version leads to ImportError.","severity":"gotcha","affected_versions":"all"},{"fix":"Always import models: from tencentcloud.hcm.v20181106 import models","message":"Some users forget to import models, causing AttributeError when constructing requests.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use: from tencentcloud.hcm.v20181106 import hcm_client","cause":"Forgot to import from the correct submodule hcm_client, or used wrong API version.","error":"ImportError: cannot import name 'HcmClient' from 'tencentcloud.hcm.v20181106'"},{"fix":"Install the common package: pip install tencentcloud-sdk-python-common","cause":"Missing the common dependency package.","error":"ModuleNotFoundError: No module named 'tencentcloud.common'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}