{"id":28323,"library":"tencentcloud-sdk-python-ape","title":"Tencent Cloud Ape SDK for Python","description":"Official Tencent Cloud SDK for the Ape (Application Performance Engine) service, providing APIs for application performance monitoring and management. Current version is 3.0.1459, with regular releases aligned to Tencent Cloud API updates.","status":"active","version":"3.0.1459","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencent-cloud","ape","sdk","application-performance"],"install":[{"cmd":"pip install tencentcloud-sdk-python-ape","lang":"bash","label":"Install"}],"dependencies":[{"reason":"Required for authentication and common client logic","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"Versioned import is required; bare import omits API version","wrong":"from tencentcloud.ape import ApeClient","symbol":"ApeClient","correct":"from tencentcloud.ape.v20200513 import ape_client"},{"note":"Models module is namespaced under the versioned package, not top-level","wrong":"import models","symbol":"models","correct":"from tencentcloud.ape.v20200513 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.ape.v20200513 import ape_client, models\n\ntry:\n    cred = credential.Credential(\n        os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n        os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n    )\n    client = ape_client.ApeClient(cred, 'ap-guangzhou')\n    req = models.DescribeApeInstancesRequest()\n    resp = client.DescribeApeInstances(req)\n    print(resp.to_json_string())\nexcept TencentCloudSDKException as e:\n    print(e)","lang":"python","description":"Basic usage: initialize credential, create client, call API. Replace region and request model as needed."},"warnings":[{"fix":"Use versioned import path including API version (e.g., v20200513).","message":"Versioned imports: `from tencentcloud.ape.v20200513 import ape_client` instead of `from tencentcloud.ape import ApeClient`. The latter is deprecated and may be removed.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update to `credential.Credential('id', 'key')` and ensure SDK >=3.0.","message":"Older SDK versions (pre-3.0) used a different credential pattern. The `Credential` class now requires secret ID and key directly, not a profile object.","severity":"deprecated","affected_versions":"<3.0.0"},{"fix":"Use `os.environ.get(...)` or `credential.Credential()` with the values, or use `credential.EnvCredential()` for automatic env loading.","message":"Environment variables `TENCENTCLOUD_SECRET_ID` and `TENCENTCLOUD_SECRET_KEY` are not automatically read; you must pass them explicitly or use `EnvCredential`.","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":"Ensure package is installed: `pip install tencentcloud-sdk-python-ape`. Import from `tencentcloud.ape.v20200513`.","cause":"Missing or incorrect import path. The package is `tencentcloud-sdk-python-ape`, but import uses `tencentcloud.ape`.","error":"ModuleNotFoundError: No module named 'tencentcloud.ape'"},{"fix":"Set environment variables TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY, or pass them directly to Credential.","cause":"Missing or invalid API credentials (SecretId/SecretKey).","error":"TencentCloudSDKException: [TencentCloudSDKException] code: UnauthorizedOperation, message: not authenticated"},{"fix":"Use `ApeClient(cred, region)` where cred is a `Credential` instance.","cause":"Client instantiation missing credential object or using deprecated signature.","error":"TypeError: __init__() missing 1 required positional argument: 'cred'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}