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.590s · 51.9MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.7s · import 0.554s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RecycleBinClient
✓ from mypy_boto3_rbin import RecycleBinClient
✗ from mypy_boto3_rbin import RecycleBinClient
Demonstrates how to import and use the `RecycleBinClient` type annotation with `boto3.client()`, including a `TYPE_CHECKING` guard for best practice.
import boto3
from mypy_boto3_rbin.client import RecycleBinClient
from typing import TYPE_CHECKING
# It's recommended to use TYPE_CHECKING guard for type stubs
if TYPE_CHECKING:
# mypy will use RecycleBinClient for type checking here
rbin_client: RecycleBinClient = boto3.client("rbin")
else:
# At runtime, it's just a regular boto3 client
rbin_client = boto3.client("rbin")
# Example: List all recovery rules
try:
print("Listing RBin recovery rules...")
response = rbin_client.list_rules()
rules = response.get("Rules", [])
print(f"Found {len(rules)} recovery rules.")
for rule in rules:
print(f" - Rule ID: {rule['Id']}, ARN: {rule['RuleArn']}")
except Exception as e:
print(f"Error listing RBin rules: {e}")
Debug
Known issues
breakingPython 3.8 is no longer supported for any `mypy-boto3` packages since `mypy-boto3-builder` 8.12.0. Projects using these stubs must upgrade their Python environment to 3.9 or newer.fixUpgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-rbin 1.42.3 and later
gotcha`mypy-boto3-rbin` provides only type stubs; you must install `boto3` separately for runtime functionality. These packages are not replacements for the actual AWS SDK.fixEnsure both `boto3` and `mypy-boto3-rbin` are installed: `pip install boto3 mypy-boto3-rbin`.
affects: All versions
gotchaThe installed package name uses hyphens (`mypy-boto3-rbin`), but the Python import path uses underscores (`mypy_boto3_rbin`). Attempting to import `mypy-boto3-rbin` directly will result in an `ImportError`.fixUse `import mypy_boto3_rbin` or specific submodules like `from mypy_boto3_rbin.client import RecycleBinClient`.
affects: All versions
breakingTypeDef naming conventions changed significantly in `mypy-boto3-builder` 8.9.0. TypeDefs for packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). Conflicting `Extra` postfixes moved to the end. This may require updating existing type annotations in your codebase.fixReview and update `TypeDef` import paths and names in your codebase according to the new conventions.
affects: mypy-boto3-rbin versions generated by builder 8.9.0 and later (e.g., 1.42.3)
gotchaWhen using type annotations with `boto3.client()`, it's recommended to use a `typing.TYPE_CHECKING` block. This prevents runtime dependency on the stub packages and avoids potential issues in environments where type checking is not performed.fixWrap client type hints in `if TYPE_CHECKING:` blocks, as shown in the quickstart example.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for which these are type stubs. Required for actual AWS API calls.