Registry /
aws / tencentcloud-sdk-python-faceid
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
FaceidClient
✓ from tencentcloud.faceid.v20180301 import faceid_client
✗ from tencentcloud.faceid import FaceidClient
Module version in path (v20180301) is required, else ImportError.
DetectAuthRequest
✓ from tencentcloud.faceid.v20180301 import models as faceid_models
✗ from tencentcloud.faceid.models import DetectAuthRequest
Models must be imported from the versioned subpackage.
Initialize client and call DetectAuth (face verification). Requires credentials and RuleId from Tencent Cloud console.
from tencentcloud.common import credential
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.faceid.v20180301 import faceid_client, models
secret_id = os.environ.get('TENCENTCLOUD_SECRET_ID', '')
secret_key = os.environ.get('TENCENTCLOUD_SECRET_KEY', '')
cred = credential.Credential(secret_id, secret_key)
client = faceid_client.FaceidClient(cred, "ap-guangzhou")
req = models.DetectAuthRequest()
req.RuleId = "your_rule_id"
try:
resp = client.DetectAuth(req)
print(resp.to_json_string())
except TencentCloudSDKException as e:
print(e)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud.faceid'
Missing pip install tencentcloud-sdk-python-faceid, or missing common dependency.
fixpip install tencentcloud-sdk-python-common tencentcloud-sdk-python-faceid
AttributeError: module 'tencentcloud.faceid' has no attribute 'v20180301'
Old style import without version subpackage; SDK v3 requires version in path.
fixUse from tencentcloud.faceid.v20180301 import faceid_client
Upgrade
Version history
3.1.80latest on PyPI · released Apr 16, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredCommon client and credential classes