Registry / type-stubs / mypy-boto3-datasync

mypy-boto3-datasync

JSON →
library1.43.58pypypi✓ verified 23d ago

mypy-boto3-datasync provides type annotations for `boto3`'s DataSync service client, enhancing static analysis with tools like MyPy. It ensures type safety for `boto3` calls, improving developer experience and catching potential errors pre-runtime. The library closely tracks `boto3` and AWS API releases, leading to frequent updates, currently at version 1.42.85.

pip install mypy-boto3-datasync
INSTALL
IMPORT
SIG · MYPY-BOTO3-DATASYN
M
mypy-boto3-datasync
type-stubspythonv1.43.58
Install
3.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.58 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DataSyncClient
from mypy_boto3_datasync import DataSyncClient
from mypy_boto3_datasync import DataSyncClient

This example demonstrates how to import and apply type hints for the DataSync client and its response types. It initializes a `boto3` client and uses `mypy-boto3-datasync` stubs to enable static analysis for operations like `list_tasks`.

import boto3 from mypy_boto3_datasync.client import DataSyncClient from mypy_boto3_datasync.type_defs import ListTasksResponseTypeDef # Initialize a boto3 client with type hinting # (Mypy may warn without # type: ignore, but it's correct for runtime use) client: DataSyncClient = boto3.client("datasync", region_name="us-east-1") try: # Use the client with type-safe operations response: ListTasksResponseTypeDef = client.list_tasks(MaxResults=5) print(f"Found {len(response.get('TaskList', []))} DataSync tasks.") for task in response.get('TaskList', []): print(f" Task ARN: {task.get('TaskArn')}, Name: {task.get('Name')}") except Exception as e: print(f"An error occurred: {e}") print("Ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION environment variables or ~/.aws/credentials).")
Debug
Known issues
breakingPython 3.8 support has been removed. All `mypy-boto3` packages now require Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or higher. For Python 3.8, use `mypy-boto3` versions <8.12.0.
affects: >=8.12.0
breakingSome generated `TypeDef` names were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) and conflicting `TypeDef` postfixes were reordered. This can cause `mypy` errors if you explicitly imported these types.
fix
Update your type import statements to reflect the new `TypeDef` names. Consult the generated stubs for the exact names if `mypy` reports an error.
affects: >=8.9.0
gotchaAll `mypy-boto3` packages, including `mypy-boto3-datasync`, migrated to PEP 561-compliant packages. While this improves standard stub discovery, older `mypy` configurations or custom stub paths might need adjustment to correctly locate the stubs.
fix
Ensure `mypy` is up-to-date. If issues persist, verify `mypy`'s `MYPYPATH` or `pyproject.toml` settings are not conflicting with standard package discovery.
affects: >=8.12.0
gotchaThese packages provide type hints for static analysis only. They do not modify `boto3`'s runtime behavior or add any runtime type checking. Any runtime errors will still occur as per `boto3`'s behavior.
fix
Understand that `mypy-boto3` is a development-time tool. Ensure robust error handling and validation for production `boto3` code.
affects: All versions
Upgrade
Version history
1.43.58latest on PyPI · released Jul 28, 2026
Audit
Dependencies
boto3requiredProvides the runtime client for which these are stubs.
mypyoptionalThe static type checker that utilizes these stubs.
typing-extensionsoptionalUsed for compatibility with some advanced type features across Python versions.
Agent activity
27 hits · last 30 days
node
22
OpenAI (training)
2
Resources
mypy-boto3-datasync — pip install mypy-boto3-datasync · libregistry