Registry / type-stubs / mypy-boto3-oam

mypy-boto3-oam

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-oam provides type annotations for the boto3 CloudWatchObservabilityAccessManager service, enabling static type checking and improved IDE support for AWS SDK for Python (boto3) users. It is generated with `mypy-boto3-builder 8.12.0` and currently stands at version 1.42.3, aligning with the versioning of `boto3` for which it provides stubs. The `mypy-boto3` project actively releases updates, often in sync with `boto3` and `botocore` releases, as well as `mypy-boto3-builder` updates.

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

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

CloudWatchObservabilityAccessManagerClient
from mypy_boto3_oam.client import CloudWatchObservabilityAccessManagerClient
from boto3.oam.client import CloudWatchObservabilityAccessManagerClient
Type stubs are imported from the mypy_boto3_oam package, not directly from boto3's internal structure.

This quickstart demonstrates how to obtain a type-hinted `CloudWatchObservabilityAccessManagerClient` using `boto3` and `mypy-boto3-oam`. It includes a `TYPE_CHECKING` guard for conditional imports, which is a common practice to avoid runtime dependencies on stub packages. Replace placeholder credentials or ensure your environment is configured for AWS authentication.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_oam.client import CloudWatchObservabilityAccessManagerClient def get_oam_client() -> 'CloudWatchObservabilityAccessManagerClient': """Gets a type-hinted CloudWatch Observability Access Manager client.""" # In a real application, credentials would be managed by boto3's configuration # or environment variables. client: CloudWatchObservabilityAccessManagerClient = boto3.client( "oam", region_name="us-east-1", aws_access_key_id="{}".format(os.environ.get('AWS_ACCESS_KEY_ID', '')) if os.environ.get('AWS_ACCESS_KEY_ID') else None, aws_secret_access_key="{}".format(os.environ.get('AWS_SECRET_ACCESS_KEY', '')) if os.environ.get('AWS_SECRET_ACCESS_KEY') else None ) return client # Example usage (will not actually call AWS without valid credentials) oam_client = get_oam_client() print(f"Client type: {type(oam_client)}") # mypy will now correctly infer methods like oam_client.list_attachments() # without requiring a runtime call.
Debug
Known issues
breakingSupport for Python 3.8 has been removed across all `mypy-boto3` packages, including `mypy-boto3-oam`. Users on Python 3.8 will need to upgrade to Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a newer version (e.g., `python -m pip install --upgrade pip` then `pyenv install 3.9.18` and switch if using pyenv).
affects: mypy-boto3-builder 8.12.0 and above
breakingThe `mypy-boto3-builder` (which generates this stub) introduced changes to TypeDef naming conventions in version 8.9.0. Specifically, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`, and `Extra` postfixes moved (`CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). While this package's core Client type is stable, explicit references to generated TypeDefs might require updates if you're using older code with newer stubs.
fix
Review your code for direct imports or explicit usage of `mypy_boto3_oam.type_defs` to ensure TypeDef names align with the latest generated stubs. IDEs with `mypy` or `pyright` should help identify these.
affects: mypy-boto3-builder 8.9.0 and above (affecting generated stub contents)
gotcha`mypy-boto3` migrated to PEP 561 packages, which is the standard for distributing type information. While this improves compatibility, users of older `mypy` or `IDE` versions might experience issues recognizing type stubs. Ensure your type checking tools are up-to-date.
fix
Update your type checker (e.g., `pip install --upgrade mypy`) and ensure your IDE's Python language server (e.g., Pylance for VSCode) is also up to date and correctly configured to use `mypy` or `pyright`.
affects: mypy-boto3-builder 8.12.0 and above
gotchaFor optimal IDE auto-completion and type inference (especially in VSCode and PyCharm), it is often recommended to use explicit type annotations when instantiating `boto3` clients, even though `mypy-boto3` aims for automatic type discovery. This can prevent cases where the IDE struggles to infer the correct `boto3` client type.
fix
Explicitly type hint your `boto3.client()` calls, e.g., `client: CloudWatchObservabilityAccessManagerClient = boto3.client('oam')`.
affects: All versions
gotchaWhen using `mypy-boto3-oam` with Pylint, if you conditionally import type stubs using `if TYPE_CHECKING: ... else: ...`, Pylint might report `undefined variable` errors for the runtime `object` assignments. This is a known issue with Pylint's interaction with `TYPE_CHECKING` guards.
fix
To fix this, you can configure Pylint to ignore these specific errors (e.g., `disable=no-name-in-module,ungot-typeinfo` in your `.pylintrc`) or use `# type: ignore` comments judiciously.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK for Python; this package provides type stubs for it.
mypyoptionalPrimary static type checker for which these stubs are designed.
pyrightoptionalAlternative static type checker that also leverages these stubs.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-oam — pip install mypy-boto3-oam · libregistry