Registry / aws / tencentcloud-sdk-python-waf

tencentcloud-sdk-python-waf

JSON →
library3.1.91pypypi✓ verified 84d ago

Official Tencent Cloud SDK for the Web Application Firewall (WAF) service. Current version 3.1.91. Released frequently as part of the tencentcloud-sdk-python monorepo.

pip install tencentcloud-sdk-python-waf
INSTALL
IMPORT
SIG · TENCENTCLOUD-SDK-P
T
tencentcloud-sdk-python-waf
awspythonv3.1.91
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.

WafClient
from tencentcloud.waf.v20180125 import waf_client, models
from tencentcloud.waf import WafClient
Versioned import (v20180125) is required; top-level import fails.

Initialize WAF client and call DescribeWafInfo. Replace region as needed.

import os from tencentcloud.common import credential from tencentcloud.waf.v20180125 import waf_client, models cred = credential.Credential( os.environ.get('TENCENTCLOUD_SECRET_ID', ''), os.environ.get('TENCENTCLOUD_SECRET_KEY', '') ) client = waf_client.WafClient(cred, "ap-guangzhou") req = models.DescribeWafInfoRequest() resp = client.DescribeWafInfo(req) print(resp.to_json_string())
Debug
Known issues
breakingVersion 3.x changes all imports to date-based subpackages (e.g., v20180125). Direct imports like 'from tencentcloud.waf import WafClient' will fail.
fix
Use versioned import: from tencentcloud.waf.v20180125 import waf_client, models
affects: >=3.0.0
gotchaThe SDK does not install its common dependency automatically when using the per-service package. Must install tencentcloud-sdk-python-common separately.
fix
Run: pip install tencentcloud-sdk-python-common
affects: all
deprecatedThe older v20180419 API version is deprecated. New projects should use v20180125.
fix
Use v20180125 for all new development.
affects: <3.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud.waf'
The per-service package tencentcloud-sdk-python-waf was not installed, or common module is missing.
fix
Install both: pip install tencentcloud-sdk-python-waf tencentcloud-sdk-python-common
AttributeError: module 'tencentcloud.waf' has no attribute 'WafClient'
Direct import from tencentcloud.waf does not expose WafClient; versioned subpackage is required.
fix
Use from tencentcloud.waf.v20180125 import waf_client
tencentcloud.common.exception.TencentCloudSDKException: UnsupportedRegion
Region string is invalid or not supported by WAF service.
fix
Use a valid region like 'ap-guangzhou', 'ap-shanghai', etc. Check Tencent Cloud docs.
Upgrade
Version history
3.1.91latest on PyPI · released May 6, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredRequired for authentication and HTTP transport
Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources