Registry / type-stubs / mypy-boto3-ses

mypy-boto3-ses

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-ses provides comprehensive type annotations for the AWS Boto3 SES (Simple Email Service) client, enhancing developer experience with static type checking, auto-completion, and early error detection. It is a generated package from the `mypy-boto3-builder` project, closely tracking `boto3` releases to ensure up-to-date type definitions. The project maintains an active release cadence, often synchronizing with new `boto3` versions and Python updates.

pip install mypy-boto3-ses boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-SES
M
mypy-boto3-ses
type-stubspythonv1.43.0
Install
3.9s avg
Import
611ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.630s · 52.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.592s · 53MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SESClient
from mypy_boto3_ses.client import SESClient
Type annotation for the SES client object from boto3.
SendEmailRequestRequestTypeDef
from mypy_boto3_ses.type_defs import SendEmailRequestRequestTypeDef
Type definition for input parameters of the `send_email` method.
SendEmailResponseTypeDef
from mypy_boto3_ses.type_defs import SendEmailResponseTypeDef
Type definition for the response object of the `send_email` method.

This quickstart demonstrates how to use `mypy-boto3-ses` to type-hint a Boto3 SES client and its associated request/response type definitions for the `send_email` operation. The `TYPE_CHECKING` block ensures that the `mypy-boto3-ses` dependency is only active during type checking, avoiding runtime overhead.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_ses.client import SESClient from mypy_boto3_ses.type_defs import SendEmailRequestRequestTypeDef, SendEmailResponseTypeDef def send_ses_email( recipient_email: str, sender_email: str, subject: str, body: str ) -> SendEmailResponseTypeDef: # In a real application, you might get region_name or credentials differently client: SESClient = boto3.client("ses", region_name="us-east-1") email_params: SendEmailRequestRequestTypeDef = { "Source": sender_email, "Destination": {"ToAddresses": [recipient_email]}, "Message": { "Subject": {"Data": subject}, "Body": {"Text": {"Data": body}}, }, } response: SendEmailResponseTypeDef = client.send_email(**email_params) print(f"Email sent! Message ID: {response['MessageId']}") return response # Example usage (will not actually send email without AWS credentials and setup) # You would replace these with actual values # if __name__ == "__main__": # from os import environ # send_ses_email( # recipient_email=environ.get('SES_RECIPIENT_EMAIL', 'test@example.com'), # sender_email=environ.get('SES_SENDER_EMAIL', 'sender@example.com'), # subject='Test Subject', # body='This is a test email body.' # )
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0, Python 3.8 is no longer supported for any generated packages, including `mypy-boto3-ses`. Ensure your project uses Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >=8.12.0 (builder)
breakingIn `mypy-boto3-builder` version 8.9.0, there were breaking changes to TypeDef naming conventions. Packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). If you relied on specific, longer TypeDef names, they may have changed.
fix
Update your type annotation imports and references to match the new TypeDef naming conventions. Consult the `mypy-boto3-builder` documentation or your type checker's errors for the correct names.
affects: >=8.9.0 (builder)
gotchaWhile `mypy-boto3-ses` provides type annotations, it is crucial to also install the `boto3` library itself. `mypy-boto3-ses` only adds static typing capabilities and does not include the runtime `boto3` functionality.
fix
Always install `boto3` alongside `mypy-boto3-ses` using `pip install boto3 mypy-boto3-ses`.
affects: All
gotchaThe `mypy-boto3` ecosystem moved to PEP 561 compliant packages in version 8.12.0 of the builder. This generally means type checkers should discover stubs automatically. However, some IDEs or linters (like older Pylint versions) might require explicit type annotations (as shown in the Quickstart) or `TYPE_CHECKING` guards to avoid 'undefined variable' complaints.
fix
For full compatibility and to avoid runtime dependencies, use the `if TYPE_CHECKING:` block. Ensure your type checker (mypy, pyright) and IDE are updated to support PEP 561 correctly.
affects: >=8.12.0 (builder)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type annotations for the `boto3` library; `boto3` itself is required at runtime.
Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
mypy-boto3-ses — pip install mypy-boto3-ses · libregistry