Install & Compatibility
Where this runs
tested against v1.43.23 · 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.646s · 116.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.8s · import 0.586s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
WorkDocsClient
✓ from mypy_boto3_workdocs.client import WorkDocsClient
✗ from boto3.client import WorkDocsClient
While boto3.client is the runtime client, mypy_boto3_workdocs provides the type definitions for static analysis.
DescribeUsersRequestRequestTypeDef
✓ from mypy_boto3_workdocs.type_defs import DescribeUsersRequestRequestTypeDef
✗ from mypy_boto3_workdocs.client import DescribeUsersRequestRequestTypeDef
Type definitions (TypedDicts) are typically found in the `type_defs` submodule, not directly under `client`.
This quickstart demonstrates how to initialize a WorkDocs client with explicit type annotations for `mypy` using `mypy-boto3-workdocs`. It shows how to obtain a typed client and use a method with its corresponding response type definition. For full functionality, ensure your AWS credentials and WorkDocs Organization ID are configured, e.g., via environment variables.
import boto3
from typing import TYPE_CHECKING
import os
if TYPE_CHECKING:
from mypy_boto3_workdocs.client import WorkDocsClient
from mypy_boto3_workdocs.type_defs import DescribeUsersResponseTypeDef
def get_workdocs_client() -> 'WorkDocsClient':
# In a real application, configure AWS credentials securely.
# For quickstart, using environment variables.
session = boto3.Session(
aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),
aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''),
region_name=os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')
)
return session.client('workdocs')
if __name__ == '__main__':
client: WorkDocsClient = get_workdocs_client()
print(f"Client type: {type(client)}")
# Example: Describe users with explicit type hints
response: DescribeUsersResponseTypeDef = client.describe_users(
OrganizationId="your_organization_id" # Replace with actual Organization ID
)
print("Successfully described users.")
print(f"Users: {response.get('Users')}")
# Note: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION
# and your_organization_id must be set for this to run successfully.
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and later. Users on Python 3.8 will need to upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or later.
affects: mypy-boto3-builder >=8.12.0 (and dependent mypy-boto3-* packages)
breakingTypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. Some TypeDef names for packed method arguments became shorter (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This might break existing type hints that use the old names.fixReview your code for explicitly typed `TypeDef` objects and update their names according to the new conventions.
affects: mypy-boto3-builder >=8.9.0 (and dependent mypy-boto3-* packages)
gotchaWhen using PyCharm, performance issues with `Literal` overloads might lead to slow performance or high CPU usage. It is recommended to use `boto3-stubs-lite` (if available for your service) or disable PyCharm's type checker and rely on `mypy` or `pyright` instead.fixConsider `pip install boto3-stubs-lite` (if you are using `boto3-stubs` umbrella package) or use `mypy`/`pyright` for type checking in PyCharm.
affects: All versions with PyCharm
gotchaPylint might report 'undefined variable' errors when using `TYPE_CHECKING` guards for `mypy-boto3` types. To fix this, set all types to `object` in the non-`TYPE_CHECKING` branch of your conditional imports.fixImplement a conditional import pattern like `if TYPE_CHECKING: from mypy_boto3_workdocs.client import WorkDocsClient else: WorkDocsClient = object`.
affects: All versions when using Pylint with `TYPE_CHECKING`
gotchaThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages in version 8.12.0. While this is primarily an internal packaging change, it ensures better compatibility and discovery of type stubs by type checkers, but users should be aware of modern packaging practices.fixEnsure your project's packaging follows current best practices, especially if encountering issues with type checker discovery.
affects: mypy-boto3-builder >=8.12.0 (and dependent mypy-boto3-* packages)
Upgrade
Version history
1.43.23latest on PyPI · released Jun 4, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, for which this library offers type stubs.
mypyoptionalThe static type checker that utilizes these annotations.
pythonrequiredRequires Python 3.9 or newer.