Install & Compatibility
Where this runs
tested against v1.43.82 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DataZoneClient
✓ from mypy_boto3_datazone.client import DataZoneClient
✗ from mypy_boto3_datazone import DataZoneClient
DataZoneServiceClient
✓ from mypy_boto3_datazone import DataZoneServiceClient
Client
✓ from mypy_boto3_datazone.client import Client
This quickstart demonstrates how to use `mypy-boto3-datazone` to add type hints to a boto3 DataZone client. It shows importing the client type and a common `TypeDef` for a response, then using them with a standard `boto3` client call. The `TYPE_CHECKING` block ensures the stub package is only used for type analysis, not runtime.
import boto3
from mypy_boto3_datazone.client import DataZoneClient
from mypy_boto3_datazone.type_defs import ListDomainsOutputTypeDef
from typing import TYPE_CHECKING, cast
if TYPE_CHECKING:
client: DataZoneClient = boto3.client("datazone")
else:
client = boto3.client("datazone")
def list_datazone_domains() -> ListDomainsOutputTypeDef:
"""Lists DataZone domains with type hints."""
# Example: List domains
response = client.list_domains()
print(f"Found {len(response.get('items', []))} DataZone domains.")
return cast(ListDomainsOutputTypeDef, response)
if __name__ == "__main__":
# Ensure boto3 is configured (e.g., AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
# For demonstration, we'll assume default config or environment variables.
try:
domains = list_datazone_domains()
for domain in domains.get('items', []):
print(f"- Domain ID: {domain.get('id')}, Name: {domain.get('name')}")
except Exception as e:
print(f"Error listing domains: {e}")
# In a real application, you'd handle specific boto3 exceptions.
Debug
Known issues
breakingPython 3.8 support was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 or older will need to upgrade their Python version to `>=3.9` to use recent versions of `mypy-boto3-datazone`.fixUpgrade your Python environment to 3.9 or newer.
affects: >=8.12.0 of mypy-boto3-builder and derived stub packages
breakingBreaking changes in `mypy-boto3-builder` version 8.9.0 introduced shorter names for TypeDefs used in packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Conflicting `Extra` postfixes in TypeDef names were also moved to the end.fixReview and update `TypeDef` import paths and names in your codebase according to the new naming conventions.
affects: >=8.9.0 of mypy-boto3-builder and derived stub packages
gotchaThe standalone `mypy-boto3` package is considered legacy. While `mypy-boto3-datazone` is a valid and current service-specific stub, it is recommended to install service stubs using the `boto3-stubs` meta-package (e.g., `pip install 'boto3-stubs[datazone]'`) for better maintainability and to avoid confusion with the older `mypy-boto3` meta-package.fixPrefer `pip install 'boto3-stubs[service]'` over `pip install mypy-boto3-service` for managing service stubs, although both approaches for `mypy-boto3-datazone` are currently functional.
affects: All versions
gotchaSome IDEs (like older PyCharm versions) or linters might require explicit type annotations for `boto3.client` calls to ensure full autocomplete and type checking, due to limitations with function overloads.fixUse explicit type annotations as shown in the quickstart (e.g., `client: DataZoneClient = boto3.client("datazone")`). Consider using `boto3-stubs-lite` if PyCharm performance issues arise with large projects, though it requires more explicit typing. affects: All versions
Upgrade
Version history
1.43.82latest on PyPI · released Aug 27, 2026
Audit
Dependencies
boto3requiredmypy-boto3-datazone provides type stubs for boto3; boto3 itself must be installed for runtime execution.