Registry /
type-stubs / mypy-boto3-bcm-pricing-calculator
Install & Compatibility
Where this runs
tested against v1.43.61 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.618s · 52.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.572s · 53MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
BillingandCostManagementPricingCalculatorClient
✓ from mypy_boto3_bcm_pricing_calculator.client import BillingandCostManagementPricingCalculatorClient
✗ from boto3_stubs.bcm_pricing_calculator.client import BillingandCostManagementPricingCalculatorClient
Import directly from the service-specific `mypy-boto3` package, not a generic `boto3_stubs` path.
This quickstart demonstrates how to initialize a `bcm-pricing-calculator` client with `boto3` and leverage the provided type hints. It includes an example of creating a bill scenario and listing existing ones. Ensure your AWS credentials are configured for authentication.
import boto3
from mypy_boto3_bcm_pricing_calculator.client import BillingandCostManagementPricingCalculatorClient
from typing import TYPE_CHECKING, cast
import os
# Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)
# For a runnable example, ensure AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION are set.
# Or configure a mock client for testing without actual AWS calls.
if TYPE_CHECKING:
client: BillingandCostManagementPricingCalculatorClient = boto3.client("bcm-pricing-calculator")
else:
client = boto3.client("bcm-pricing-calculator")
try:
# Example: Create a new bill scenario
# The Billing and Cost Management Pricing Calculator API is complex and often requires specific parameters.
# This is a minimal example; adjust parameters as per your actual use case.
scenario_name = f"MyTypeHintedScenario-{os.urandom(4).hex()}"
response = client.create_bill_scenario(
Name=scenario_name,
GroupSharingPreference='OPEN'
)
print(f"Successfully created bill scenario: {response['name']} (ID: {response['id']})")
# Example of retrieving scenarios (if any exist)
list_response = client.list_bill_scenarios()
print("\nExisting Bill Scenarios:")
for scenario in list_response.get('BillScenarios', []):
print(f" - {scenario['name']} (ID: {scenario['id']})")
# For cleanup, you might delete the created scenario:
# client.delete_bill_scenario(Id=response['id'])
# print(f"Deleted scenario {response['id']}")
except client.exceptions.AccessDeniedException:
print("Access Denied. Ensure your AWS credentials have permissions for bcm-pricing-calculator service.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 support was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 must pin an older version of `mypy-boto3-builder` or `mypy-boto3-bcm-pricing-calculator` if direct installation of this specific stub package is done, or upgrade their Python version.fixUpgrade to Python 3.9+ or pin `mypy-boto3-builder<8.12.0` / `mypy-boto3-bcm-pricing-calculator<1.42.3`.
affects: >=8.12.0 (builder), >=1.42.3 (package)
breakingThe `mypy-boto3-builder` migrated to PEP 561 compliant packages in version 8.12.0. This might affect how some tools discover or interpret type stubs, especially in older or less compliant environments.fixEnsure your type checker (e.g., `mypy`, `pyright`) and IDE are updated to recent versions that fully support PEP 561. Reinstalling packages might be necessary.
affects: >=8.12.0 (builder), >=1.42.3 (package)
gotchaPyCharm users may experience slow performance or high CPU usage due to `Literal` overloads. It is recommended to use `types-boto3-lite` (if available for this service) or disable PyCharm's type checker and rely on `mypy`/`pyright` for checks.fixFor PyCharm, consider `mypy-boto3-lite` variants or external type checkers like `mypy` or `pyright`.
affects: All versions
gotchaThis library provides *only* type annotations. `boto3` itself is a separate runtime dependency and must be installed alongside `mypy-boto3-bcm-pricing-calculator` for your code to run.fixAlways install `boto3` (e.g., `pip install boto3 mypy-boto3-bcm-pricing-calculator`).
affects: All versions
breakingBreaking changes were introduced in `mypy-boto3-builder` 8.9.0, specifically regarding `TypeDef` naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While this specific service might not be directly affected by these exact names, similar changes could impact other generated types.fixReview your code for any explicit imports of `TypeDef` objects, as their names might have been shortened or refactored. Consult the specific service's `mypy-boto3` documentation for exact type names.
affects: >=8.9.0 (builder)
Upgrade
Version history
1.43.61latest on PyPI · released Jul 31, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK functions being type-hinted.