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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.758s · 52.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.694s · 53MB
51MB installed
● package 51MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PinpointClient
✓ from mypy_boto3_pinpoint.client import PinpointClient
✗ from boto3.client import PinpointClient
The type stub is provided by mypy_boto3_pinpoint, not directly by boto3 itself. Although modern type checkers often infer this, explicit import from the stub package is the most robust approach.
This quickstart demonstrates how to obtain a type-hinted Pinpoint client using `boto3.session.Session().client()` and `mypy_boto3_pinpoint.client.PinpointClient`. The `if TYPE_CHECKING:` block ensures that the type stub import is only processed by static analysis tools, preventing a runtime dependency on the stub package.
from typing import TYPE_CHECKING
import boto3
from boto3.session import Session
if TYPE_CHECKING:
from mypy_boto3_pinpoint.client import PinpointClient
def get_pinpoint_client() -> 'PinpointClient':
# In a real application, consider using AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
# environment variables or other boto3 credential providers.
# For local development or testing, this might use ~/.aws/credentials
# or IAM roles.
session = Session(region_name='us-east-1')
return session.client('pinpoint')
# Example usage (will be type-checked by mypy):
client = get_pinpoint_client()
# client.send_messages(...) # mypy will now validate arguments for send_messages
print(f"Pinpoint client created: {client}")
# Without TYPE_CHECKING, the import is ignored at runtime, preventing a direct dependency on the stub package.
# In a runtime context without type checking, `client` is simply the boto3 client object.
Debug
Known issues
breakingSupport for Python 3.8 was removed starting with mypy-boto3-builder v8.12.0, which affects all generated stub packages including mypy-boto3-pinpoint. The minimum required Python version is now 3.9.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >= 8.12.0 (and corresponding mypy-boto3-pinpoint versions)
breakingSpecific TypeDef names were changed for consistency and brevity (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`) in mypy-boto3-builder v8.9.0. If your code explicitly references these verbose TypeDefs, it will break.fixUpdate explicit TypeDef imports and references to use the shorter, revised names. Consult the `mypy_boto3_pinpoint.type_defs` module for the correct names.
affects: mypy-boto3-builder >= 8.9.0 (and corresponding mypy-boto3-pinpoint versions)
gotchamypy-boto3-pinpoint provides *only* type annotations. The actual `boto3` library must be installed separately for the code to run at runtime. Failure to install `boto3` will result in `ModuleNotFoundError` or similar runtime errors.fixEnsure `boto3` is installed alongside `mypy-boto3-pinpoint` using `pip install boto3 mypy-boto3-pinpoint`.
affects: All versions
gotchaThe versioning of individual `mypy-boto3-*` service stub packages (like `mypy-boto3-pinpoint`) is tied to the `boto3` version they annotate. However, the `mypy-boto3-builder` tool, which generates these stubs, has its own independent versioning.fixWhen troubleshooting or upgrading, note that the builder's version does not directly match the stub package's version. Refer to the `mypy-boto3-builder` release notes for changes affecting stub generation and `mypy-boto3-pinpoint` PyPI/docs for its specific version compatibility with `boto3`.
affects: All versions
gotchaWhile many IDEs and recent `mypy` versions can infer types without explicit stub imports, using `if TYPE_CHECKING:` guards the stub imports. This prevents adding the stub package as a runtime dependency and can avoid potential import conflicts or performance issues with some tooling.fixWrap your `mypy-boto3-pinpoint` imports within an `if TYPE_CHECKING:` block, as shown in the quickstart example, to ensure they are only active during type checking.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredmypy-boto3-pinpoint provides type annotations; boto3 is the actual runtime library it annotates.