mypy-boto3-application-signals Type Stubs
mypy-boto3-application-signals provides static type annotations for the `boto3` AWS SDK specifically for the CloudWatchApplicationSignals service, currently at version 1.42.76. It is generated by `mypy-boto3-builder` and receives frequent updates, often aligning with `boto3` releases and `mypy-boto3-builder` enhancements, to ensure up-to-date type information for improved code quality and IDE support.
Warnings
- breaking Support for Python 3.8 has been removed across all `mypy-boto3` packages with builder version 8.12.0. Users must use Python 3.9 or higher.
- breaking All `mypy-boto3` packages migrated to PEP 561, impacting how stubs are distributed and potentially how some build systems or explicit import paths behave.
- gotcha PyCharm users might experience slow performance or high CPU usage due to `Literal` overloads. It's recommended to use `boto3-stubs-lite` (if applicable for the service), or disable PyCharm's internal type checker and rely on `mypy` or `pyright`.
- breaking General `mypy-boto3` `TypeDef` naming conventions changed in builder version 8.9.0. `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`, and conflicting `Extra` postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`).
- deprecated The `sms-voice` service was deprecated and removed from `mypy-boto3` builds in builder version 8.11.0. Users should migrate to `pinpoint-sms-voice` instead. While this specific package is for `application-signals`, this indicates potential breaking changes for other services in the `mypy-boto3` ecosystem.
Install
-
pip install mypy-boto3-application-signals -
pip install boto3-stubs[application-signals]
Imports
- ApplicationSignalsClient
from mypy_boto3_application_signals.client import ApplicationSignalsClient
- CloudWatchEventSourceType
from mypy_boto3_application_signals.literals import CloudWatchEventSourceType
- ServiceResource
from mypy_boto3_application_signals.service_resource import ApplicationSignalsServiceResource
Quickstart
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_application_signals.client import ApplicationSignalsClient
def get_application_signals_client() -> ApplicationSignalsClient:
"""Provides a type-hinted CloudWatchApplicationSignals client."""
# boto3.client will be correctly type-hinted by mypy when mypy-boto3-application-signals is installed.
return boto3.client("application-signals")
client = get_application_signals_client()
# Example usage with type-hinted client (methods and parameters will autocomplete)
response = client.list_service_dependencies(
StartTime=1678886400, # Example timestamp
EndTime=1678886400 + 3600 # Example timestamp
)
print(response)