Install & Compatibility
Where this runs
tested against v1.43.74 · 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.000s · 18.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
WorkSpacesClient
✓ from mypy_boto3_workspaces import WorkSpacesClient
✗ from mypy_boto3_workspaces import WorkSpacesClient
This quickstart demonstrates how to use the `mypy-boto3-workspaces` stubs with a `boto3` client. It shows type-hinting a boto3 client object with `WorkSpacesClient` to enable static analysis for WorkSpaces operations.
import boto3
from mypy_boto3_workspaces import WorkSpacesClient, WorkSpacesServiceName
from mypy_boto3_workspaces.type_defs import DescribeWorkspacesRequestRequestTypeDef
def list_all_workspaces(client: WorkSpacesClient):
"""Lists all WorkSpaces with type hints."""
print("Describing WorkSpaces...")
paginator = client.get_paginator("describe_workspaces")
all_workspaces = []
for page in paginator.paginate():
workspaces = page.get("Workspaces", [])
all_workspaces.extend(workspaces)
print(f"Found {len(all_workspaces)} WorkSpaces.")
for ws in all_workspaces[:3]: # Print first 3 for brevity
print(f"- {ws.get('WorkspaceId')} ({ws.get('State')})")
if __name__ == "__main__":
# Initialize a boto3 client for WorkSpaces
# The type hint here ensures MyPy checks usage against WorkSpacesClient stubs
workspaces_client: WorkSpacesClient = boto3.client(WorkSpacesServiceName.WORKSPACES)
list_all_workspaces(workspaces_client)
Debug
Known issues
breakingPython 3.8 is no longer supported. `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-workspaces` 1.42.66) removed support for Python 3.8 across all generated packages.fixUpgrade to Python 3.9 or newer.
affects: mypy-boto3-workspaces >= 1.42.66, mypy-boto3-builder >= 8.12.0
breakingMigration to PEP 561 compliant packages. `mypy-boto3-builder` 8.12.0 changed how these stub packages are structured for PEP 561 compliance. While generally beneficial for automatic discovery by type checkers, custom MyPy configurations might require adjustments.fixEnsure your `mypy` configuration (if customized) is compatible with standard PEP 561 package layouts. In most cases, this change should be transparent or improve stub discovery.
affects: mypy-boto3-workspaces >= 1.42.66, mypy-boto3-builder >= 8.12.0
gotchaThese packages provide only type stubs. They do not contain the runtime logic for AWS interactions. You must have `boto3` installed separately to use the AWS SDK functionality at runtime.fixAlways ensure `boto3` is installed alongside `mypy-boto3-workspaces` (e.g., `pip install boto3 mypy-boto3-workspaces`).
affects: All versions
breakingTypedDict naming conventions changed in `mypy-boto3-builder` 8.9.0. This can lead to breaking changes for specific `TypedDict` names, for example, by removing redundant 'Request' suffixes (e.g., `FooRequestRequestTypeDef` might become `FooRequestTypeDef`).fixRefer to the specific service's generated `type_defs.pyi` for the exact new names of `TypedDict`s after upgrading. Your IDE's autocompletion should also help.
affects: mypy-boto3-builder >= 8.9.0, mypy-boto3-workspaces >= 1.35.0
Upgrade
Version history
1.43.74latest on PyPI · released Aug 18, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for the boto3 library, which must be installed separately for runtime functionality.
mypyoptionalThe primary tool for static type checking that consumes these stubs.