Registry / aws / tencentcloud-sdk-python-tiia

tencentcloud-sdk-python-tiia

JSON →
library3.1.69pypypi✓ verified 84d ago

Tencent Cloud TIAA SDK for Python provides image analysis capabilities including image recognition, content moderation, and image search. Current version 3.1.69. Releases follow TencentCloud SDK release cadence with occasional breaking changes due to API updates.

pip install tencentcloud-sdk-python-tiia
INSTALL
IMPORT
SIG · TENCENTCLOUD-SDK-P
T
tencentcloud-sdk-python-tiia
awspythonv3.1.69
harness data pending
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.

TiiaClient
from tencentcloud.tiia.v20190529 import tiia_client
from tencentcloud.tiia.v20190529.tiia_client import TiiaClient
Use tiia_client module directly
models
from tencentcloud.tiia.v20190529 import models
from tencentcloud.tiia import models
Must specify API version

Instantiates a TIAA client with credentials from environment variables and calls AssessQuality on an image URL.

import os from tencentcloud.common import credential from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.tiia.v20190529 import tiia_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 = tiia_client.TiiaClient(cred, "ap-guangzhou") req = models.AssessQualityRequest() req.ImageUrl = "https://example.com/image.jpg" try: resp = client.AssessQuality(req) print(resp.to_json_string()) except TencentCloudSDKException as e: print(e)
Debug
Known issues
gotchaAlways specify the API version (v20190529) in imports. Many examples omit it, causing ImportError.
fix
Use 'from tencentcloud.tiia.v20190529 import tiia_client' instead of 'from tencentcloud.tiia import tiia_client'.
affects: all
breakingIn version 3.x, the client class name changed from 'TiiaClient' to 'tiia_client.TiiaClient' due to automatic code generation. Older code using 'TiiaClient' directly may break if package structure changes.
fix
Import as 'from tencentcloud.tiia.v20190529 import tiia_client' and use 'tiia_client.TiiaClient'.
affects: 3.x
deprecatedSome old methods (e.g., 'DetectCelebrity') are deprecated. Check the official API documentation for current methods.
fix
Use new method names as per API docs (e.g., 'RecognizeImage' instead of 'DetectCelebrity').
affects: all
gotchaThe environment variables for credentials are 'TENCENTCLOUD_SECRET_ID' and 'TENCENTCLOUD_SECRET_KEY', not 'SECRET_ID' or others. Common mistake leads to auth failure.
fix
Set environment variables with correct names.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'TiiaClient' from 'tencentcloud.tiia.v20190529.tiia_client'
Incorrect import path. The client is inside 'tiia_client' module.
fix
Use 'from tencentcloud.tiia.v20190529 import tiia_client' and then instantiate 'tiia_client.TiiaClient()'.
TencentCloudSDKException: [TencentCloudSDKException] code: UnsupportedOperation, message: this action is not supported in this region
The TIAA service is not available in the selected region (e.g., ap-shanghai).
fix
Use a supported region like 'ap-guangzhou' or check TIAA region availability.
AttributeError: module 'tencentcloud.tiia.v20190529' has no attribute 'models'
Forgot to import models separately.
fix
Add 'from tencentcloud.tiia.v20190529 import models'.
TypeError: __init__() missing 2 required positional arguments: 'secret_id' and 'secret_key'
Credentials not provided or missing from environment.
fix
Set 'TENCENTCLOUD_SECRET_ID' and 'TENCENTCLOUD_SECRET_KEY' environment variables, or pass them directly to Credential() constructor.
Upgrade
Version history
3.1.69latest on PyPI · released Apr 1, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for authentication and common client functionality
Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources
tencentcloud-sdk-python-tiia — pip install tencentcloud-sdk-python-tiia · libregistry