Registry / communication / tencentcloud-sdk-python-ses

tencentcloud-sdk-python-ses

JSON →
library3.1.85pypypi✓ verified 84d ago

Official Tencent Cloud SDK for Simple Email Service (SES). Version 3.1.85. Part of the Tencent Cloud Python SDK with product-specific packages; released frequently alongside the main SDK. Requires a Tencent Cloud secret ID and key for authentication.

pip install tencentcloud-sdk-python-ses
INSTALL
IMPORT
SIG · TENCENTCLOUD-SDK-P
T
tencentcloud-sdk-python-ses
communicationpythonv3.1.85
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.

SesClient
from tencentcloud.ses.v20201002 import ses_client
from tencentcloud.ses import SesClient
Old import path does not include API version; leads to ModuleNotFoundError
SendEmailRequest
from tencentcloud.ses.v20201002 import models
from tencentcloud.ses import models
Models must be imported from the versioned subpackage

Send a simple email using SES client with secret id/key from environment variables.

import os from tencentcloud.common import credential from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException from tencentcloud.ses.v20201002 import ses_client, models try: cred = credential.Credential( os.environ.get('TENCENTCLOUD_SECRET_ID', ''), os.environ.get('TENCENTCLOUD_SECRET_KEY', '') ) client = ses_client.SesClient(cred, 'ap-guangzhou') req = models.SendEmailRequest() req.FromEmailAddress = 'sender@example.com' req.Destination = ['recipient@example.com'] req.Subject = 'Test' req.Simple = models.Simple() req.Simple.Subject = 'Test' req.Simple.HtmlBody = '<p>Hello</p>' resp = client.SendEmail(req) print(resp.RequestId) except TencentCloudSDKException as err: print(err)
Debug
Known issues
gotchaAll requests require an API version suffix in the import path (v20201002). Using tencentcloud.ses without the version will cause ModuleNotFoundError.
fix
Use from tencentcloud.ses.v20201002 import ses_client, models
affects: >=2.x
deprecatedThe SDK old instance-based client (e.g., TencentCloudAPI) is deprecated. Use the request-style (client + request object) pattern.
fix
Instantiate client with SesClient(cred, region) and call methods with request objects.
affects: >=3.0
gotchaRegion must be explicitly set, even if using default. Some users omit region and get connection errors.
fix
Always pass a region string (e.g., 'ap-guangzhou') to the client constructor.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tencentcloud.ses.v20201002'
Installing the common package but forgetting the product-specific package.
fix
pip install tencentcloud-sdk-python-ses
AttributeError: module 'tencentcloud.ses' has no attribute 'ses_client'
Importing from the non-versioned module.
fix
Use: from tencentcloud.ses.v20201002 import ses_client
TencentCloudSDKException: [InvalidParameter] InvalidParameterValue
Required fields missing or incorrect in the request model (e.g., no Subject or Destination).
fix
Ensure all mandatory fields are set: FromEmailAddress, Destination, Subject, and either Simple or Template.
Upgrade
Version history
3.1.85latest on PyPI · released Apr 23, 2026
Audit
Dependencies
tencentcloud-sdk-python-commonrequiredCommon SDK base with client classes and authentication
Agent activity
44 hits · last 30 days
node
40
OpenAI (training)
1
Resources
tencentcloud-sdk-python-ses — pip install tencentcloud-sdk-python-ses · libregistry