Registry / type-stubs / mypy-boto3-notifications

mypy-boto3-notifications

JSON →
library1.43.0pypypi✓ verified 22d ago

Provides static type annotations for the `boto3` AWS User Notifications service client, enhancing code reliability through static type checking with tools like MyPy. It is version 1.42.3, generated by `mypy-boto3-builder`, and receives frequent updates in sync with new `boto3` releases and builder improvements.

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

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

NotificationsClient
from mypy_boto3_notifications.client import NotificationsClient
from mypy_boto3_notifications import NotificationsClient
Client types are nested under the `.client` submodule, not directly in the package root.
PublishRequestRequestTypeDef
from mypy_boto3_notifications.type_defs import PublishRequestRequestTypeDef
from mypy_boto3_notifications.client import PublishRequestRequestTypeDef
Type definitions for request/response bodies are located in the `.type_defs` submodule, separate from client interfaces.

This quickstart demonstrates how to use `mypy-boto3-notifications` to type-hint a `boto3` client for the AWS User Notifications service. It shows importing the client type and a request `TypeDef`, then using them to ensure type correctness when interacting with the service. This allows MyPy to catch potential errors during development.

import boto3 from mypy_boto3_notifications.client import NotificationsClient from mypy_boto3_notifications.type_defs import PublishRequestRequestTypeDef # Ensure boto3 is installed: pip install boto3 def publish_notification(topic_arn: str, message: str) -> dict: # Type-hint the boto3 client for AWS User Notifications client: NotificationsClient = boto3.client("notifications") request_params: PublishRequestRequestTypeDef = { "Target": {"TargetArn": topic_arn}, # Example target "Payload": {"Subject": "Alert", "Body": message} } try: response = client.publish(request_params) print(f"Notification published: {response.get('NotificationId')}") return response except Exception as e: print(f"Error publishing notification: {e}") raise # Example usage (replace with actual ARN and message) # if __name__ == '__main__': # # NOTE: This example requires valid AWS credentials and a configured Notifications target # # This service is for AWS User Notifications, which integrates with targets like AWS Chatbot or SNS. # # For actual SNS topics, use boto3.client("sns"). # sample_topic_arn = "arn:aws:sns:REGION:ACCOUNT_ID:TOPIC_NAME" # This is just an example placeholder # sample_message = "This is a test notification from mypy-boto3-notifications." # # publish_notification(sample_topic_arn, sample_message)
Debug
Known issues
breakingPython 3.8 support was removed from `mypy-boto3-builder` (which generates these stubs) in version 8.12.0. Users on Python 3.8 or older will need to upgrade their Python version to >=3.9 or use an older stub version.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder>=8.12.0, mypy-boto3-notifications corresponds to this
breakingType definition (TypeDef) naming conventions changed in `mypy-boto3-builder` 8.9.0. This includes shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving the `Extra` postfix. Code explicitly importing and using these `TypeDefs` may break.
fix
Update `TypeDef` import names in your code to match the new conventions. Consult the specific service's `type_defs.pyi` for the correct names.
affects: mypy-boto3-builder>=8.9.0, mypy-boto3-notifications corresponds to this
gotchaThese packages (`mypy-boto3-notifications`) provide only type annotations. You must install `boto3` separately for the actual AWS SDK functionality at runtime. For type checking, `mypy` is also required as a development dependency.
fix
Ensure both `boto3` (runtime) and `mypy` (dev) are installed alongside `mypy-boto3-notifications`.
affects: All versions
gotchaThe `mypy-boto3` ecosystem migrated to PEP 561-compliant packages in `mypy-boto3-builder` 8.12.0. While this generally improves compatibility, some tools or custom configurations that relied on older stub discovery mechanisms might require adjustments.
fix
Ensure your type checker (e.g., MyPy) is up-to-date and correctly configured to find PEP 561-style stub packages. Most common setups should work without manual intervention.
affects: mypy-boto3-builder>=8.12.0, mypy-boto3-notifications corresponds to this
gotchaOccasionally, specific AWS services may be renamed or deprecated within the `boto3` ecosystem (e.g., `sms-voice` was replaced by `pinpoint-sms-voice`). While this specific stub is for `notifications`, keep an eye on upstream `boto3` changes, as they might eventually affect the service name or availability.
fix
Refer to official AWS `boto3` documentation for service names and changes. If a service is renamed, update your `boto3.client()` calls and corresponding `mypy-boto3-*` stub imports.
affects: All versions, depends on upstream AWS/boto3 changes
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK runtime for which these stubs are generated. This package only provides type hints.
Agent activity
21 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
mypy-boto3-notifications — pip install mypy-boto3-notifications · libregistry