Registry / type-stubs / mypy-boto3-notificationscontacts

mypy-boto3-notificationscontacts

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-notificationscontacts provides type annotations for the `boto3` AWS UserNotificationsContacts service. It is part of the `mypy-boto3-builder` project, which frequently releases updates to keep pace with `boto3` and `botocore` releases, ensuring up-to-date and accurate type hints for AWS service clients. The current version is 1.42.3.

pip install mypy-boto3-notificationscontacts boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-NOTIFIC
M
mypy-boto3-notificationscontacts
type-stubspythonv1.43.0
Install
3.7s avg
Import
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.000s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.000s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

NotificationsContactsClient
from mypy_boto3_notificationscontacts.client import NotificationsContactsClient
NotificationsContactsServiceResource
from mypy_boto3_notificationscontacts.service_resource import NotificationsContactsServiceResource
Not all boto3 services have a 'ServiceResource'; this is specific to those that do. Use Client for most operations.
ContactChannelTypeDef
from mypy_boto3_notificationscontacts.type_defs import ContactChannelTypeDef
Import specific TypeDefs for precise typing of request and response dictionaries.

This quickstart demonstrates how to initialize a `boto3` client for the UserNotificationsContacts service and type it using `mypy-boto3-notificationscontacts`. It includes a basic interaction (listing contact channels) and error handling, emphasizing the need for both `boto3` and the type stubs, and proper AWS credentials.

import boto3 from typing import TYPE_CHECKING import os # Ensure boto3 is installed: pip install boto3 # Ensure stubs are installed: pip install mypy-boto3-notificationscontacts if TYPE_CHECKING: from mypy_boto3_notificationscontacts.client import NotificationsContactsClient from mypy_boto3_notificationscontacts.type_defs import ListContactChannelsResponseTypeDef def get_notifications_contacts_client() -> "NotificationsContactsClient": # Use environment variables for credentials in production # Example: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME return boto3.client( "notifications-contacts", region_name=os.environ.get('AWS_REGION', 'us-east-1') ) client = get_notifications_contacts_client() try: # Example: Listing contact channels response: ListContactChannelsResponseTypeDef = client.list_contact_channels() print("Successfully listed contact channels:") for channel in response.get("ContactChannels", []): print(f" - Channel ID: {channel.get('ChannelId')}, Type: {channel.get('ChannelType')}") except client.exceptions.ClientError as e: print(f"Error calling list_contact_channels: {e}") if e.response.get('Error', {}).get('Code') == 'AccessDeniedException': print("Check your AWS credentials and IAM permissions for NotificationsContacts.") # Example: Creating a contact (requires specific parameters and permissions) # try: # create_contact_response = client.create_contact( # ContactAlias="my-contact", # DisplayName="My Contact", # Type="PERSONAL", # or 'STANDARD' # # 'Plan': {'Stage': [{'StageName': 'Default', 'DurationInMinutes': 5, 'Targets': [...]}]} # ) # print(f"Created contact: {create_contact_response.get('ContactArn')}") # except client.exceptions.ClientError as e: # print(f"Error creating contact: {e}")
Debug
Known issues
breakingStarting with `mypy-boto3-builder` version 8.12.0 (which generates these stubs), Python 3.8 is no longer supported. Ensure your project uses Python 3.9 or newer.
fix
Upgrade your project's Python version to 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-notificationscontacts >= 1.42.3
breakingThe `mypy-boto3-builder` project migrated to PEP 561 compliant packages (with `py.typed` markers) in version 8.12.0. While this generally improves type checker integration, older `mypy` versions or custom `mypy` configurations might need adjustments if stubs are not being picked up correctly.
fix
Ensure you are using a recent version of `mypy`. If issues persist, verify `mypy`'s `follow_imports` settings or refer to `mypy` and `mypy-boto3` documentation.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-notificationscontacts >= 1.42.3
gotchaThis package provides *only* type stubs. You must explicitly install `boto3` (e.g., `pip install boto3`) for your code to run at runtime. These stubs are for static analysis by tools like `mypy`.
fix
Always include `boto3` in your project's runtime dependencies (e.g., `requirements.txt`).
affects: All
gotchaThis specific package (`mypy-boto3-notificationscontacts`) provides type stubs for the AWS UserNotificationsContacts service only. If you need type stubs for multiple or all `boto3` services, consider installing the `mypy-boto3` meta-package or individual service stubs as needed to avoid potential conflicts or missing types.
fix
Install `mypy-boto3` (for all services) or additional `mypy-boto3-SERVICE_NAME` packages for other services you use.
affects: All
deprecatedAWS services can be deprecated, renamed, or replaced, which will be reflected in `mypy-boto3` packages. For example, `sms-voice` was removed in `builder` 8.11.0, replaced by `pinpoint-sms-voice`. Always check the `mypy-boto3-builder` release notes for changes affecting service availability or naming.
fix
Consult the `mypy-boto3-builder` release notes and `boto3` documentation for the latest service names and APIs. Update your code and package dependencies accordingly.
affects: mypy-boto3-builder >= 8.11.0
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis library provides type stubs for boto3, so boto3 must be installed for runtime functionality.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-notificationscontacts — pip install mypy-boto3-notificationscontacts · libregistry