{"library":"mypy-boto3-notificationscontacts","title":"mypy-boto3-notificationscontacts Type Stubs","description":"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.","language":"python","status":"active","last_verified":"Thu May 14","install":{"commands":["pip install mypy-boto3-notificationscontacts boto3"],"cli":null},"imports":["from mypy_boto3_notificationscontacts.client import NotificationsContactsClient","from mypy_boto3_notificationscontacts.service_resource import NotificationsContactsServiceResource","from mypy_boto3_notificationscontacts.type_defs import ContactChannelTypeDef"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\nimport os\n\n# Ensure boto3 is installed: pip install boto3\n# Ensure stubs are installed: pip install mypy-boto3-notificationscontacts\n\nif TYPE_CHECKING:\n    from mypy_boto3_notificationscontacts.client import NotificationsContactsClient\n    from mypy_boto3_notificationscontacts.type_defs import ListContactChannelsResponseTypeDef\n\ndef get_notifications_contacts_client() -> \"NotificationsContactsClient\":\n    # Use environment variables for credentials in production\n    # Example: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME\n    return boto3.client(\n        \"notifications-contacts\",\n        region_name=os.environ.get('AWS_REGION', 'us-east-1')\n    )\n\nclient = get_notifications_contacts_client()\n\ntry:\n    # Example: Listing contact channels\n    response: ListContactChannelsResponseTypeDef = client.list_contact_channels()\n    print(\"Successfully listed contact channels:\")\n    for channel in response.get(\"ContactChannels\", []):\n        print(f\"  - Channel ID: {channel.get('ChannelId')}, Type: {channel.get('ChannelType')}\")\nexcept client.exceptions.ClientError as e:\n    print(f\"Error calling list_contact_channels: {e}\")\n    if e.response.get('Error', {}).get('Code') == 'AccessDeniedException':\n        print(\"Check your AWS credentials and IAM permissions for NotificationsContacts.\")\n\n# Example: Creating a contact (requires specific parameters and permissions)\n# try:\n#     create_contact_response = client.create_contact(\n#         ContactAlias=\"my-contact\",\n#         DisplayName=\"My Contact\",\n#         Type=\"PERSONAL\", # or 'STANDARD'\n#         # 'Plan': {'Stage': [{'StageName': 'Default', 'DurationInMinutes': 5, 'Targets': [...]}]}\n#     )\n#     print(f\"Created contact: {create_contact_response.get('ContactArn')}\")\n# except client.exceptions.ClientError as e:\n#     print(f\"Error creating contact: {e}\")\n","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-14","installed_version":"1.43.0","pypi_latest":"1.43.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":3.8,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"51.0M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4,"import_time_s":null,"mem_mb":null,"disk_size":"52M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"54.1M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.9,"import_time_s":null,"mem_mb":null,"disk_size":"55M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"45.3M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3.2,"import_time_s":null,"mem_mb":null,"disk_size":"46M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"45.0M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3,"import_time_s":null,"mem_mb":null,"disk_size":"46M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"50.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.7,"import_time_s":null,"mem_mb":null,"disk_size":"51M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-boto3-notificationscontacts","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}