{"id":3687,"library":"mypy-boto3-route53-recovery-control-config","title":"mypy-boto3-route53-recovery-control-config Type Annotations","description":"This library provides type annotations for the `boto3` AWS SDK's Route53RecoveryControlConfig service, compatible with static analysis tools like mypy, pyright, and various IDEs. Currently at version `1.42.3`, it helps improve code quality and error detection for `boto3` usage. The release cadence is tied to updates in `boto3` itself and the `mypy-boto3-builder` project, which generates these stubs.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","type-hints","stubs","route53-recovery-control-config","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-route53-recovery-control-config boto3","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"This is a type stub package for boto3; boto3 must be installed and used at runtime for these type hints to be relevant.","package":"boto3","optional":false}],"imports":[{"note":"This import is for type-hinting the boto3 client object. The actual client instance is created via `boto3.client('route53-recovery-control-config')`.","symbol":"Route53RecoveryControlConfigClient","correct":"from mypy_boto3_route53_recovery_control_config.client import Route53RecoveryControlConfigClient"},{"note":"This import provides a TypedDict for the return value of the `list_clusters` operation, enabling precise type checking of the response structure.","symbol":"ListClustersOutputTypeDef","correct":"from mypy_boto3_route53_recovery_control_config.type_defs import ListClustersOutputTypeDef"}],"quickstart":{"code":"import boto3\nimport os\n\nfrom mypy_boto3_route53_recovery_control_config.client import Route53RecoveryControlConfigClient\nfrom mypy_boto3_route53_recovery_control_config.type_defs import ListClustersOutputTypeDef\n\ndef get_r53_recovery_control_config_client() -> Route53RecoveryControlConfigClient:\n    \"\"\"Returns a type-hinted Route53RecoveryControlConfig client.\"\"\"\n    # Ensure AWS credentials and region are configured (e.g., via environment variables or ~/.aws/credentials)\n    region_name = os.environ.get('AWS_REGION', 'us-east-1')\n    return boto3.client('route53-recovery-control-config', region_name=region_name)\n\ndef list_r53_recovery_clusters() -> ListClustersOutputTypeDef:\n    \"\"\"Lists Route53 Recovery Control Config clusters with type hints.\"\"\"\n    client = get_r53_recovery_control_config_client()\n    response: ListClustersOutputTypeDef = client.list_clusters()\n    for cluster in response.get('Clusters', []):\n        print(f\"Cluster ARN: {cluster['ClusterArn']}, Name: {cluster['ClusterName']}\")\n    return response\n\nif __name__ == '__main__':\n    try:\n        print(\"Listing Route53 Recovery Control Config clusters...\")\n        result = list_r53_recovery_clusters()\n        print(f\"Successfully listed {len(result.get('Clusters', []))} clusters.\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n        print(\"Please ensure 'boto3' is installed and AWS credentials/region are configured.\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted `Route53RecoveryControlConfigClient` using `boto3` and perform a basic operation, `list_clusters`, with a type-hinted response. It requires `boto3` to be installed and AWS credentials configured in the environment."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or a later version.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated this package), support for Python 3.8 has been removed. Projects using this package must use Python 3.9 or newer.","severity":"breaking","affected_versions":">=1.42.0 (generated by mypy-boto3-builder 8.12.0)"},{"fix":"Review your code for `TypedDict` imports and update names according to the latest generated stubs if you encounter `mypy` errors related to missing types.","message":"In `mypy-boto3-builder` version 8.9.0, there were changes to `TypeDef` naming conventions to be more concise (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While this specific example might not apply directly to all services, be aware that `TypeDef` names for inputs/outputs across services might have changed in this or subsequent `mypy-boto3-builder` versions.","severity":"breaking","affected_versions":">=1.42.0 (generated by mypy-boto3-builder 8.9.0 and later)"},{"fix":"Ensure `boto3` is installed in your project (`pip install boto3`) alongside `mypy-boto3-route53-recovery-control-config`.","message":"This package provides only type stubs and does not include any runtime code for the AWS SDK. You must separately install and use the `boto3` library for your application to function correctly.","severity":"gotcha","affected_versions":"all"},{"fix":"Consult your type checker's documentation for optimal configuration, especially regarding stub package discovery and strictness settings.","message":"The `mypy-boto3` packages are PEP 561 compliant, meaning type checkers like `mypy` and `pyright` should automatically discover them. However, for optimal type checking and IDE integration, ensure your type checker is correctly configured (e.g., `mypy` with `strict=True` in `pyproject.toml` or `mypy.ini`).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}