{"id":3590,"library":"mypy-boto3-internetmonitor","title":"Type Annotations for boto3 CloudWatch Internet Monitor","description":"mypy-boto3-internetmonitor provides comprehensive type annotations for the boto3 CloudWatch Internet Monitor service (version 1.42.3). Generated with mypy-boto3-builder 8.12.0, these stubs enhance development with static type checking, improved code completion, and refactoring capabilities for boto3 users across various IDEs like VSCode, PyCharm, Emacs, and Sublime Text, and type checkers such as mypy and pyright. The library is actively maintained, with updates released in sync with boto3 versions.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["python","types","mypy","boto3","aws","type-hints","internetmonitor","cloudwatch"],"install":[{"cmd":"pip install mypy-boto3-internetmonitor","lang":"bash","label":"Install standalone package"},{"cmd":"pip install 'boto3-stubs[internetmonitor]'","lang":"bash","label":"Install with boto3-stubs (recommended)"}],"dependencies":[{"reason":"Provides the runtime functionality that these stubs type-annotate.","package":"boto3"}],"imports":[{"symbol":"InternetMonitorClient","correct":"from mypy_boto3_internetmonitor.client import InternetMonitorClient"},{"symbol":"ListMonitorsPaginator","correct":"from mypy_boto3_internetmonitor.paginator import ListMonitorsPaginator"},{"symbol":"AvailabilityMeasurementTypeDef","correct":"from mypy_boto3_internetmonitor.type_defs import AvailabilityMeasurementTypeDef"},{"symbol":"HealthEventImpactTypeType","correct":"from mypy_boto3_internetmonitor.literals import HealthEventImpactTypeType"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_internetmonitor.client import InternetMonitorClient\n\ndef get_internetmonitor_client() -> InternetMonitorClient:\n    client: InternetMonitorClient = boto3.client(\"internetmonitor\")\n    return client\n\n# Example usage\ninternetmonitor_client = get_internetmonitor_client()\nresponse = internetmonitor_client.list_monitors()\nprint(f\"Monitor summaries: {response.get('Monitors')}\")\n","lang":"python","description":"Demonstrates how to obtain a type-hinted CloudWatch Internet Monitor client using boto3.session.client(). This enables full type checking and autocompletion for the client's methods and responses."},"warnings":[{"fix":"Upgrade to Python 3.9 or newer.","message":"mypy-boto3-builder (which generates this package) removed support for Python 3.8 in version 8.12.0. If you are using `mypy-boto3-internetmonitor 1.42.3` or newer, Python 3.8 is no longer supported.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-internetmonitor >= 1.42.3"},{"fix":"Ensure your type checker (e.g., mypy, pyright) and build tools are up-to-date and configured to correctly resolve PEP 561 packages. Typically, no manual fix is needed if using standard tools.","message":"The project migrated to PEP 561 compliant packages with `mypy-boto3-builder 8.12.0`. This might affect how type checkers or build systems locate and use stub files if they relied on older, non-PEP 561 patterns.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-internetmonitor >= 1.42.3"},{"fix":"Review your code for explicit TypeDef imports and adjust names according to the new convention (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`).","message":"TypeDefs for packed method arguments now use shorter names, and conflicting TypeDef 'Extra' postfixes were moved to the end with `mypy-boto3-builder 8.9.0`. This could break existing type hints if you explicitly imported and used these TypeDefs by their old names.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0, mypy-boto3-internetmonitor >= 1.42.3"},{"fix":"Always explicitly type-hint the client object, e.g., `client: InternetMonitorClient = boto3.client(\"internetmonitor\")`.","message":"Some IDEs (e.g., VSCode, older PyCharm versions) may require explicit type annotations for `boto3.client()` or `session.client()` calls to provide full autocomplete and type checking, even if `mypy` or `pyright` can infer types implicitly. This is due to limitations in IDE language server support for complex overloads.","severity":"gotcha","affected_versions":"All versions"},{"fix":"In non-`TYPE_CHECKING` blocks, set the type aliases to `object`, e.g., `if TYPE_CHECKING: from mypy_boto3_ec2 import EC2Client else: EC2Client = object`.","message":"When using `TYPE_CHECKING` for conditional imports to avoid runtime dependency on stubs, Pylint might report 'undefined variable' errors. This is a known issue with Pylint's handling of conditional typing.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}