Registry / type-stubs / mypy-boto3-swf

mypy-boto3-swf

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-swf provides a set of type annotations (stubs) for the boto3 SWF (Simple Workflow Service) client. It enables static type checking with tools like MyPy for `boto3` interactions, enhancing code reliability and developer experience. The library is actively maintained, with new versions released frequently in sync with `boto3` updates and `mypy-boto3-builder` developments.

pip install boto3 mypy-boto3-swf
INSTALL
IMPORT
SIG · MYPY-BOTO3-SWF
M
mypy-boto3-swf
type-stubspythonv1.43.0
Install
3.9s avg
Import
605ms
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.632s · 52.1MB
glibc
py 3.103.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.
fix
Upgrade 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.
fix
Ensure 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.
fix
Always 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.
fix
Replace `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.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-swf — pip install mypy-boto3-swf · libregistry