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.632s · 52.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.578s · 53MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SWFClient
✓ from mypy_boto3_swf.client import SWFClient
Import for type-hinting the boto3 SWF client object.
ListDomainsResponseTypeDef
✓ from mypy_boto3_swf.type_defs import ListDomainsResponseTypeDef
Import for type-hinting specific response objects or other TypeDefs.
boto3.client('swf')
✓ import boto3; client: SWFClient = boto3.client('swf')
✗ from mypy_boto3_swf import client as swf_client
The actual client object comes from `boto3`; `mypy-boto3-swf` provides only the type definitions for it.
This example demonstrates how to initialize a type-hinted SWF client using `boto3.client` and then use it with `mypy-boto3-swf`'s stubs for static analysis. It shows how to import and apply `SWFClient` for the client object and `ListDomainsResponseTypeDef` for API call responses, ensuring type safety for your `boto3` interactions.
import boto3
from mypy_boto3_swf.client import SWFClient
from mypy_boto3_swf.type_defs import ListDomainsResponseTypeDef, DomainInfoTypeDef
# Create a typed SWF client
# Note: boto3 itself needs to be installed, mypy-boto3-swf only provides type stubs.
client: SWFClient = boto3.client("swf")
try:
# List registered domains and type-hint the response
response: ListDomainsResponseTypeDef = client.list_domains(
registrationStatus="REGISTERED",
maximumPageSize=5
)
print(f"Registered SWF Domains: {response.get('domainInfos', [])}")
# Example of processing specific domain info with a TypeDef
def process_domain_info(domain_info: DomainInfoTypeDef) -> None:
print(f"Domain Name: {domain_info['name']}, Status: {domain_info['status']}")
if 'domainInfos' in response and response['domainInfos']:
process_domain_info(response['domainInfos'][0])
except Exception as e:
print(f"Error listing domains: {e}")
Debug
Known issues
breakingPython 3.8 support has been officially removed starting with `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-swf` 1.42.3). Projects using these stubs now require Python 3.9 or higher.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-swf >=1.42.3
breakingAll `mypy-boto3` packages, including `mypy-boto3-swf`, migrated to PEP 561 compliant distributions with `mypy-boto3-builder` 8.12.0. This might affect how type checkers locate and use stubs in specific build or environment configurations.fixEnsure your project's `pyproject.toml` or `setup.cfg` is correctly configured for PEP 561 stub packages, and update your type checker to a recent version.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-swf >=1.42.3
gotcha`mypy-boto3-swf` provides *only* type annotations (stubs). It does not include the `boto3` runtime itself. For your code to run, you must install `boto3` as well.fixAlways ensure both `boto3` and `mypy-boto3-swf` are installed in your project (e.g., `pip install boto3 mypy-boto3-swf`).
affects: All
breakingOlder projects using the monolithic `mypy-boto3` package for all services should migrate to service-specific stub packages like `mypy-boto3-swf`. The builder changed to separate products in 8.9.0.fixReplace `mypy-boto3` with `mypy-boto3-<service>` packages for specific AWS services you use, e.g., `pip install mypy-boto3-swf`.
affects: mypy-boto3-builder >=8.9.0 (for generating), users migrating from older `mypy-boto3` monolithic package.
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for the 'boto3' library. 'boto3' itself must be installed for runtime execution.