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
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RAMClient
✓ from mypy_boto3_ram.client import RAMClient
✗ from mypy_boto3_ram import RAMClient
RAMServiceResource
✓ from mypy_boto3_ram.service_resource import RAMServiceResource
ServiceResource
✓ from mypy_boto3_ram.service_resource import ServiceResource
This example demonstrates how to initialize a `RAMClient` with type annotations and use a basic operation like `list_resource_shares`. The type annotation ensures that `mypy` and IDEs provide correct autocompletion and type-checking for RAM service-specific methods and parameters.
import boto3
from mypy_boto3_ram import RAMClient
import os
def list_resource_shares_typed() -> None:
# It's recommended to explicitly type the client for full type-checking benefits
# Especially if not installing the full 'boto3-stubs' package
client: RAMClient = boto3.client("ram", region_name=os.environ.get('AWS_REGION', 'us-east-1'))
# The client methods are now fully type-checked
response = client.list_resource_shares(resourceOwner='SELF')
print("Resource Shares:")
for share in response.get('resourceShares', []):
print(f" - {share['name']} ({share['status']})")
if __name__ == "__main__":
# Ensure AWS credentials/config are set up, e.g., via environment variables or ~/.aws/credentials
# For this example, we're using a dummy region name; replace with actual if needed.
list_resource_shares_typed()
Debug
Known issues
breakingPython 3.8 support has been removed in mypy-boto3-builder version 8.12.0 and later packages. Users on Python 3.8 will need to upgrade to Python 3.9+ or use an older version of mypy-boto3-ram.fixUpgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0, mypy-boto3-ram >= 1.42.x
breakingTypeDef names were changed in mypy-boto3-builder 8.9.0. This includes shortening packed method argument TypeDefs (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving `Extra` postfixes for conflicting names. Code relying on explicit TypeDef imports might break.fixReview and update explicit `TypeDef` imports in your codebase according to the new naming conventions. Refer to the specific service's documentation for updated TypeDef names.
affects: mypy-boto3-builder >= 8.9.0
gotchaMismatching versions of `boto3` and `mypy-boto3-ram` can lead to incorrect type hints or `mypy` errors. `mypy-boto3-ram` versions generally correspond to compatible `boto3` versions (e.g., `mypy-boto3-ram 1.42.59` is for `boto3 1.42.59`).fixEnsure that your `boto3` and `mypy-boto3-ram` package versions are aligned. For instance, install `boto3==1.42.59` alongside `mypy-boto3-ram==1.42.59`.
affects: All versions
gotchaWhile `mypy-boto3-ram` is a standalone package, for comprehensive `boto3` type-hinting, especially for `Session.client()` and `Session.resource()` overloads without explicit annotations, installing `boto3-stubs[ram]` is often recommended. Standalone packages might require more explicit type annotations in some IDEs.fixFor the best experience with auto-discovery of types and IDE completion, consider installing `boto3-stubs` with the `ram` extra: `pip install 'boto3-stubs[ram]'`.
affects: All versions
gotchaPylint might report 'undefined variable' errors when using `from typing import TYPE_CHECKING` blocks to conditionally import `mypy-boto3` types. This is a known issue with Pylint's interaction with `TYPE_CHECKING`.fixTo resolve Pylint complaints, set the type aliases to `object` in the `else` branch of the `TYPE_CHECKING` block. For example:
`if TYPE_CHECKING: from mypy_boto3_ram import RAMClient
else: RAMClient = object`
affects: All versions
gotchaPyCharm users might experience slow performance or high CPU usage due to `Literal` overloads in `boto3-stubs` packages. The `lite` versions of the stubs are provided as a workaround.fixIf experiencing PyCharm performance issues, consider uninstalling `mypy-boto3-ram` (or `boto3-stubs`) and installing the lite version: `pip install 'boto3-stubs-lite[ram]'`. Note that the lite version requires more explicit type annotations.
affects: All versions (specific to PyCharm)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredmypy-boto3-ram provides type stubs for boto3, which must be installed separately for runtime functionality.