Registry /
type-stubs / mypy-boto3-workmailmessageflow
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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.568s · 51.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.546s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
WorkMailMessageFlowClient
✓ from mypy_boto3_workmailmessageflow import WorkMailMessageFlowClient
✗ from boto3.client import WorkMailMessageFlowClient
Type stubs are imported from the mypy_boto3_ service-specific package, not directly from boto3 or botocore.
This example demonstrates how to initialize a WorkMailMessageFlow client with type annotations and call a method to retrieve raw message content. It uses environment variables for AWS credentials and region, falling back to placeholders for demonstration purposes. Note that `mypy-boto3-workmailmessageflow` only provides type information, so `boto3` must be installed separately.
import boto3
from mypy_boto3_workmailmessageflow import WorkMailMessageFlowClient
from os import environ
# Instantiate a WorkMailMessageFlow client with type hints
client: WorkMailMessageFlowClient = boto3.client(
"workmailmessageflow",
region_name=environ.get("AWS_REGION", "us-east-1"),
aws_access_key_id=environ.get("AWS_ACCESS_KEY_ID", ""),
aws_secret_access_key=environ.get("AWS_SECRET_ACCESS_KEY", "")
)
# Example usage: Get raw message content (requires an existing message ID)
# Replace 'your-message-id' with an actual message ID from WorkMailMessageFlow
try:
message_id = environ.get("WORKMAIL_MESSAGE_ID", "your-message-id")
response = client.get_raw_message_content(
messageId=message_id
)
print(f"Successfully retrieved message content for ID: {message_id}")
# The Body is a StreamingBody, read its content
# with response['messageContent']._raw_stream as stream:
# print(stream.read().decode('utf-8'))
except client.exceptions.MessageNotFoundException:
print(f"Message with ID '{message_id}' not found.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingAs of mypy-boto3-builder version 8.12.0, support for Python 3.8 has been removed across all generated `mypy-boto3` packages, including `mypy-boto3-workmailmessageflow`. Projects using Python 3.8 will encounter issues.fixUpgrade your Python environment to 3.9 or newer. The `requires_python` metadata is `>=3.9`.
affects: mypy-boto3-builder >=8.12.0
breakingThe `mypy-boto3-builder` (version 8.12.0) migrated to PEP 561 compliant stub-only packages. This might affect how type checkers locate and interpret stubs if your tooling or project setup relies on older assumptions about stub package structure.fixEnsure your `mypy` and IDE configurations are up-to-date and correctly detect PEP 561 packages. For `mypy`, this usually works automatically with `pip install`.
affects: mypy-boto3-builder >=8.12.0
breakingIn `mypy-boto3-builder` version 8.9.0, TypeDef naming conventions changed for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and the `Extra` postfix for conflicting TypeDefs was moved. This could break type checking for code explicitly importing or referencing these generated type definitions.fixReview and update explicit `TypeDef` imports and references in your code to match the new naming conventions. Consult the `mypy-boto3-workmailmessageflow.type_defs` module for current names.
affects: mypy-boto3-builder >=8.9.0
gotcha`mypy-boto3-workmailmessageflow` provides *only* type annotations, not the `boto3` library itself. You must install `boto3` separately for your code to run at runtime.fixEnsure `boto3` is installed in your environment: `pip install boto3`.
affects: All
gotchaWhile some IDEs and `mypy` might infer types, explicitly annotating `boto3.client` calls (e.g., `client: WorkMailMessageFlowClient = boto3.client("workmailmessageflow")`) is highly recommended for optimal autocomplete and precise type checking.fixAdd explicit type annotations for `boto3` client and resource objects in your code.
affects: All
gotchaPyCharm users might experience slow performance with `Literal` overloads due to a known IDE issue (PY-40997). For resource-constrained environments or performance-sensitive setups, `boto3-stubs-lite` is recommended as an alternative.fixConsider installing `mypy-boto3-workmailmessageflow-lite` instead: `pip install mypy-boto3-workmailmessageflow-lite`.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK runtime functionality that these type stubs annotate.
mypyoptionalThe primary static type checker for which these annotations are designed.