Install & Compatibility
Where this runs
tested against v1.43.41 · 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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.644s · 53.6MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.5s · import 0.584s · 54MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MailManagerClient
✓ from mypy_boto3_mailmanager import MailManagerClient
✗ from boto3.client import MailManagerClient
The MailManagerClient type is provided by the stub package, not directly from the runtime `boto3` library.
This example demonstrates how to initialize a `boto3` MailManager client with explicit type annotations from `mypy-boto3-mailmanager`. It includes a basic operation (listing addons) and showcases the use of `TYPE_CHECKING` for conditional imports to maintain runtime efficiency. Remember to replace placeholder AWS credentials with actual environment variables or configuration.
from typing import TYPE_CHECKING
import boto3
import os
if TYPE_CHECKING:
from mypy_boto3_mailmanager import MailManagerClient
from mypy_boto3_mailmanager.type_defs import CreateAddonResponseTypeDef
def create_mail_manager_client() -> 'MailManagerClient':
"""Creates a typed MailManager client."""
session = boto3.session.Session(
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),
region_name=os.environ.get('AWS_REGION', 'us-east-1')
)
# Explicit type annotation helps mypy and IDEs
client: MailManagerClient = session.client('mailmanager')
return client
def list_mail_manager_addons():
"""Lists MailManager addons with type-checked client."""
client = create_mail_manager_client()
try:
response = client.list_addons(PageSize=10)
# Using TypeDef for response provides further type safety
addons: list[dict] = response.get('Addons', [])
print(f"Found {len(addons)} MailManager addons.")
for addon in addons:
print(f" Addon ID: {addon.get('AddonId')}")
except client.exceptions.ClientError as e:
print(f"Error listing addons: {e}")
if __name__ == '__main__':
list_mail_manager_addons()
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, which generated this package. `mypy-boto3-mailmanager` now requires Python 3.9 or higher.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-mailmanager >=1.42.80
breakingThe `mypy-boto3` ecosystem migrated to PEP 561-compatible packages in `mypy-boto3-builder` 8.12.0. This change affects how type checkers discover and prioritize type information. Stub-only packages are now the standard, superseding any inline types in the runtime library if present.fixEnsure `mypy-boto3-mailmanager` is correctly installed in your type-checking environment. MyPy should automatically discover it, but verify your MyPy configuration to include installed packages.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-mailmanager >=1.42.80
breakingIn `mypy-boto3-builder` 8.9.0, a breaking change was introduced for TypeDef naming conventions. Some packed method arguments or conflicting TypeDefs had their names shortened or adjusted (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). This *could* affect TypeDefs within MailManager if it had similarly named long type definitions.fixReview your code for any custom type annotations using `mypy_boto3_mailmanager.type_defs` and update TypeDef names if they no longer match.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-mailmanager >=1.34.0 (approximate)
gotcha`mypy-boto3-mailmanager` provides *only* type stubs. It does not include the `boto3` runtime library itself. `boto3` must be installed separately in your project for your code to function.fixAlways install `boto3` alongside `mypy-boto3-mailmanager` (e.g., `pip install boto3 mypy-boto3-mailmanager`).
affects: All
gotchaFor optimal type checking and IDE auto-completion, especially with `boto3.client()` and `boto3.session.client()`, it is highly recommended to use explicit type annotations for your client objects.fixAnnotate your client variables, e.g., `client: MailManagerClient = session.client('mailmanager')`. affects: All
gotchaTo prevent `mypy-boto3-mailmanager` from becoming a runtime dependency in production environments, encapsulate its imports within a `if TYPE_CHECKING:` block. This ensures the imports are only processed by type checkers and ignored at runtime.fixWrap your `from mypy_boto3_mailmanager import ...` statements with `from typing import TYPE_CHECKING` and an `if TYPE_CHECKING:` block.
affects: All
Upgrade
Version history
1.43.41latest on PyPI · released Jul 6, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python at runtime, which these stubs type-check.
typing-extensionsoptionalRequired for compatibility with older Python versions, though current library requires Python >=3.9, it is listed as a dependency on PyPI.