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.910 runs
installs and imports cleanly · install 0.0s · import 0.647s · 53.6MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.7s · import 0.597s · 54MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
WorkMailClient
✓ from mypy_boto3_workmail.client import WorkMailClient
Provides type annotations for `boto3.client("workmail")`.
AccessControlRuleTypeDef
✓ from mypy_boto3_workmail.type_defs import AccessControlRuleTypeDef
Example of importing a generated TypedDict for request/response payloads.
AccessControlRuleEffectType
✓ from mypy_boto3_workmail.literals import AccessControlRuleEffectType
Example of importing a generated Literal type for specific string values.
This quickstart demonstrates how to obtain a type-hinted WorkMail client using `mypy-boto3-workmail` and perform a basic API call like listing organizations. The `TYPE_CHECKING` block ensures that `mypy-boto3-workmail` is only used for type checking and not as a runtime dependency. Remember to have `boto3` installed for runtime execution.
import boto3
from mypy_boto3_workmail.client import WorkMailClient
from typing import TYPE_CHECKING
if TYPE_CHECKING:
client: WorkMailClient
else:
client = boto3.client("workmail")
# Example usage: List organizations
# client = boto3.client("workmail") # In actual runtime, use this line
try:
response = client.list_organizations(MaxResults=5) # Type-checked call
for org in response.get("OrganizationSummaries", []):
print(f"Organization ID: {org['OrganizationId']}, State: {org['State']}")
except client.exceptions.OrganizationNotFoundException:
print("No WorkMail organizations found.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 support was removed starting with `mypy-boto3-builder` version 8.12.0. If you are using an older Python version, you must use an older `mypy-boto3-workmail` release or upgrade your Python environment.fixUpgrade Python to 3.9+ or pin `mypy-boto3-workmail` to an older version compatible with Python 3.8 (e.g., <1.42.0).
affects: >=8.12.0 of mypy-boto3-builder (which generates mypy-boto3-workmail versions 1.42.0+)
breakingTypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. Specifically, 'RequestRequestTypeDef' was shortened to 'RequestTypeDef' and 'Extra' postfixes moved to the end. This can break existing explicit `TypeDef` imports.fixUpdate `TypeDef` import paths and names in your code to match the new convention. Review the specific service's `type_defs` module.
affects: >=8.9.0 of mypy-boto3-builder (which generates mypy-boto3-workmail versions 1.42.0+)
gotchaPylint may raise `undefined-variable` warnings for type-hinted `boto3` clients when `mypy-boto3-workmail` is installed. This is due to how Pylint handles the `TYPE_CHECKING` guard.fixUse a conditional assignment within a `if TYPE_CHECKING:` block, setting runtime variables to `object` in the `else` branch, as shown in the quickstart example.
affects: All versions
gotchaThis package provides *only* type annotations. You must also install the `boto3` library to actually make AWS API calls at runtime.fixEnsure `boto3` is installed alongside `mypy-boto3-workmail` (e.g., `pip install mypy-boto3-workmail boto3`).
affects: All versions
gotchaFor PyCharm users, there can be performance issues with `Literal` overloads provided by `mypy-boto3-workmail`. PyCharm's indexing might be slow.fixIt is recommended to use `boto3-stubs-lite` instead of the full `boto3-stubs` or `mypy-boto3-*` packages, as the lite versions are more RAM-friendly and mitigate this issue. Note that `boto3-stubs-lite` requires more explicit type annotations.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for interacting with AWS WorkMail service.
mypyoptionalOptional: For static type checking of Python code.
pyrightoptionalOptional: For static type checking of Python code.