Registry /
type-stubs / mypy-boto3-bcm-recommended-actions
This library provides comprehensive type annotations (stubs) for the `boto3` client of the AWS Billing and Cost Management Recommended Actions service, enabling static type checking with tools like MyPy. It is part of the `mypy-boto3` project, which generates stubs for all AWS services. The current version is `1.42.9`, and the project has a frequent release cadence, often aligning with `boto3` updates and new AWS service features.
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
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
The client type hint comes from the mypy-boto3 stub package, not directly from boto3.
from mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient
from mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient
from mypy_boto3_bcm_recommended_actions.service_resource import BillingAndCostManagementRecommendedActionsServiceResource
This quickstart demonstrates how to initialize a `boto3` client for the Billing and Cost Management Recommended Actions service and annotate it with the `mypy-boto3` provided type, enabling static analysis of API calls.
import boto3
from mypy_boto3_bcm_recommended_actions.client import BillingAndCostManagementRecommendedActionsClient
# For demonstration, typically use AWS credentials configured externally
# via environment variables, ~/.aws/credentials, etc.
# This example assumes you have valid AWS credentials configured.
try:
session = boto3.Session(region_name="us-east-1")
client: BillingAndCostManagementRecommendedActionsClient = session.client(
"billing-cost-management-recommended-actions"
)
# Example: List resource budgeting recommendations (actual API call might vary)
# Note: This service's API details might not have common public list operations
# The example is illustrative for type checking.
# Consult AWS BCM Recommended Actions documentation for actual operations.
print("Attempting a dummy client call for type checking demonstration...")
# The BCM Recommended Actions service typically works with specific actions/recommendations.
# A simple call might not exist for generic 'list'.
# Let's simulate a call that would be type-checked if it existed.
# For real use, replace with an actual API method like 'get_recommendations'.
# response = client.get_recommendations(RecommendationType='SOME_TYPE') # Example
# print(response)
print("Client successfully initialized with type hints.")
print(f"Client type: {type(client)}")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure 'boto3' is installed and AWS credentials are configured.")
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.