Registry / type-stubs / mypy-boto3-rum

mypy-boto3-rum

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-rum provides type annotations for the `boto3` CloudWatchRUM service, enhancing static analysis with tools like Mypy and Pyright. It is part of the `mypy-boto3` family of packages, generated by `mypy-boto3-builder`. The library is actively maintained with frequent updates, aligning with `boto3` releases to ensure up-to-date type information.

pip install mypy-boto3-rum boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-RUM
M
mypy-boto3-rum
type-stubspythonv1.43.0
Install
3.8s avg
Import
588ms
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.614s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.562s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

CloudWatchRUMClient
from mypy_boto3_rum.client import CloudWatchRUMClient
Used for explicit type annotation of the boto3 client.
boto3
import boto3
from boto3.rum import CloudWatchRUMClient
mypy-boto3 stubs enhance the existing `boto3` library; you don't typically import service clients directly from `boto3` in this manner for type checking.

This example demonstrates how to initialize a `boto3` CloudWatchRUM client and use it to list app monitors, benefiting from `mypy-boto3-rum`'s type annotations for improved code completion and static analysis. Explicit type hints are included for better IDE support.

import boto3 from typing import TYPE_CHECKING # For explicit type hinting, especially helpful for IDEs if TYPE_CHECKING: from mypy_boto3_rum.client import CloudWatchRUMClient from mypy_boto3_rum.type_defs import ListAppMonitorsResponseTypeDef def get_rum_client() -> 'CloudWatchRUMClient': """Initializes and returns a typed CloudWatchRUM client.""" # Mypy will correctly infer the type of 'client' if mypy-boto3-rum is installed client: CloudWatchRUMClient = boto3.client('rum') return client def list_rum_app_monitors(): client = get_rum_client() try: response: ListAppMonitorsResponseTypeDef = client.list_app_monitors() print(f"Found {len(response.get('AppMonitorSummaries', []))} app monitors.") for monitor_summary in response.get('AppMonitorSummaries', []): print(f" - {monitor_summary.get('Name')}: {monitor_summary.get('Id')}") except client.exceptions.ResourceNotFoundException: print("No CloudWatch RUM app monitors found.") except Exception as e: print(f"An error occurred: {e}") if __name__ == '__main__': # This assumes AWS credentials are configured (e.g., via ~/.aws/credentials or env vars) # For a real application, consider explicit region and credentials list_rum_app_monitors()
Debug
Known issues
breakingPython 3.8 support has been removed as of `mypy-boto3-builder` version 8.12.0. Ensure your project runs on Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a later version.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-rum (all versions generated by builder >=8.12.0)
breakingThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages with `mypy-boto3-builder` 8.12.0. While largely backward compatible, it changes how type checkers discover stubs. Ensure your `mypy` is up to date.
fix
Update your `mypy` installation to the latest version. Verify `mypy` configuration to ensure stub discovery is working correctly.
affects: mypy-boto3-builder >=8.12.0
breakingSome generated `TypeDef` names were shortened in `mypy-boto3-builder` 8.9.0 (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If you were explicitly importing and using such type definitions, they might have changed.
fix
Consult the `mypy-boto3` documentation for the specific service to find the updated `TypeDef` names and adjust your imports accordingly.
affects: mypy-boto3-builder >=8.9.0
gotchaFor optimal code completion and type inference in IDEs like VSCode or PyCharm, it is often recommended to use explicit type annotations for `boto3.client` and `boto3.resource` calls, even though `mypy` might infer them implicitly.
fix
Add explicit type annotations for clients, resources, paginators, and waiters (e.g., `client: CloudWatchRUMClient = boto3.client('rum')`).
affects: All
gotchaPylint might raise `undefined-variable` warnings when using `mypy-boto3` stubs with `TYPE_CHECKING` guards.
fix
Set type-hinted variables to `object` in the `else` branch of `if TYPE_CHECKING:` blocks to satisfy Pylint.
affects: All
gotchaPyCharm users might experience slow performance or high CPU usage due to the complexity of `boto3-stubs`'s literal overloads.
fix
Consider installing `boto3-stubs-lite` (if available for CloudWatchRUM) or disabling PyCharm's built-in type checker and relying on `mypy` or `pyright` for checks.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime library for AWS SDK interactions, these are type stubs for it.
typing-extensionsrequiredRequired for compatibility with older Python versions and advanced typing features.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-rum — pip install mypy-boto3-rum · libregistry