Registry / type-stubs / mypy-boto3-pinpoint-sms-voice

mypy-boto3-pinpoint-sms-voice

JSON →
library1.43.0pypypi✓ verified 23d ago

This library provides essential type annotations for the `boto3` Pinpoint SMS Voice service, generated by `mypy-boto3-builder`. It enables static type checking with tools like Mypy, enhancing code quality and developer experience for AWS interactions. The current version is 1.42.3, and releases are frequent, typically in sync with `boto3` and `botocore` updates.

pip install mypy-boto3-pinpoint-sms-voice boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-PINPOIN
M
mypy-boto3-pinpoint-sms-voice
type-stubspythonv1.43.0
Install
3.9s avg
Import
11ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.010s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.006s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

PinpointSMSVoiceClient
from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_pinpoint_sms_voice import PinpointSMSVoiceClient
SendMessagesRequestRequestTypeDef
from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_pinpoint_sms_voice.type_defs import SendMessagesRequestRequestTypeDef

This quickstart demonstrates how to initialize a `boto3` Pinpoint SMS Voice client and how `mypy-boto3` provides type hints for both the client object and specific service request/response type definitions. Code within `if TYPE_CHECKING:` blocks is for static analysis and does not run at runtime. For actual API calls, replace dummy values and ensure AWS credentials are set up.

import boto3 from typing import TYPE_CHECKING, cast import os # This package provides type stubs for boto3.client("pinpoint-sms-voice"). # Install `mypy-boto3-pinpoint-sms-voice` and `boto3` for type checking. # --- Runtime code (runs without stubs, but benefits from them during development) --- print("--- Runtime code ---") # Ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars) # or ~/.aws/credentials. # Example of creating a boto3 client at runtime pinpoint_client = boto3.client( "pinpoint-sms-voice", region_name=os.environ.get('AWS_REGION', 'us-east-1') ) print(f"Created boto3 client for {pinpoint_client.meta.service_model.service_name}") # --- Type-checking specific code (only for static analysis tools like mypy) --- if TYPE_CHECKING: from mypy_boto3_pinpoint_sms_voice import PinpointSMSVoiceClient from mypy_boto3_pinpoint_sms_voice.type_defs import SendMessagesRequestRequestTypeDef # Mypy will understand that pinpoint_client is a PinpointSMSVoiceClient # after the stubs are installed. An explicit cast is often not needed, # but can be used for stricter checking or clarity. typed_client: PinpointSMSVoiceClient = cast(PinpointSMSVoiceClient, pinpoint_client) # Example of using a type definition for a request payload. Mypy validates its structure. send_messages_request: SendMessagesRequestRequestTypeDef = { "ApplicationId": "dummy-app-id", # Replace with your actual Pinpoint Application ID "MessageRequest": { "Addresses": {"+1234567890": {"ChannelType": "SMS"}}, # Replace with real phone numbers "Message": {"Body": "Hello from checklist.day!"}, }, } print("\n--- Type-checking example (mypy validates this structure) ---") print(f"Request structure type: {type(send_messages_request)}") # In a type-checked environment, you'd get auto-completion and validation for: # typed_client.send_messages(**send_messages_request) else: print("\n--- To enable full type-checking, run `mypy your_script.py` after installation ---") print("\nQuickstart complete. Ensure AWS credentials are configured for actual API calls.")
Debug
Known issues
breakingThe AWS service client name for Pinpoint SMS Voice was changed from `sms-voice` to `pinpoint-sms-voice` in `mypy-boto3-builder` version 8.11.0. Using the old name with newer `boto3` or `mypy-boto3` stubs will result in runtime errors (e.g., `ClientError` or `KeyError`).
fix
Update your `boto3.client('sms-voice')` calls to `boto3.client('pinpoint-sms-voice')`. If you were using an older specific `mypy-boto3-sms-voice` package, uninstall it and install `mypy-boto3-pinpoint-sms-voice`.
affects: Code using `boto3.client('sms-voice')` with `mypy-boto3-builder >= 8.11.0` stubs or `boto3` versions released after this change.
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Consequently, `mypy-boto3-pinpoint-sms-voice` versions built with 8.12.0 or later (e.g., 1.42.x) require Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or higher. If unable to upgrade, pin your `mypy-boto3-pinpoint-sms-voice` dependency to `<1.42.0` (e.g., `mypy-boto3-pinpoint-sms-voice<1.42.0`) to use the last compatible version.
affects: `mypy-boto3-pinpoint-sms-voice` versions 1.42.0 and above.
gotchaWhile `mypy-boto3` automatically provides types for `boto3.client(...)` calls, explicit imports for `TypeDef` classes (e.g., `SendMessagesRequestRequestTypeDef`) must be guarded by `if TYPE_CHECKING:` to prevent potential runtime import errors if `mypy-boto3` is not installed or when running a compiled version.
fix
Wrap all imports from `mypy_boto3_pinpoint_sms_voice.type_defs` (and other submodules) within an `if TYPE_CHECKING:` block, as demonstrated in the quickstart example.
affects: All versions
gotchaThese packages provide static type stubs for `boto3`; they do not alter `boto3`'s runtime behavior. They are for compile-time type checking only. Actual AWS API calls still require `boto3` to be installed and properly configured with valid AWS credentials.
fix
Ensure `boto3` is installed alongside `mypy-boto3-pinpoint-sms-voice` (as shown in the `install` instructions). Understand that the stubs enhance developer tooling but do not execute or modify AWS operations.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the runtime functionality that these stubs type-check. Required for actual AWS API calls.
typing-extensionsoptionalRequired for specific type-hinting features on Python versions older than 3.11.
Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
2
Resources