{"id":3131,"library":"mypy-boto3-route53","title":"mypy-boto3-route53 Type Annotations","description":"mypy-boto3-route53 provides comprehensive type annotations for the Amazon Route53 service client in `boto3`. It enhances development with static type checking, autocompletion, and improved readability for AWS interactions. The current version is 1.42.6, generated with `mypy-boto3-builder 8.12.0`, and it typically releases new versions in sync with `boto3` and `botocore` updates.","status":"active","version":"1.42.6","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","typing","type-hints","route53","cloud"],"install":[{"cmd":"pip install mypy-boto3-route53","lang":"bash","label":"Install specific service stubs"},{"cmd":"pip install boto3-stubs[route53]","lang":"bash","label":"Install with boto3-stubs meta-package"}],"dependencies":[{"reason":"Provides the underlying AWS SDK for Python that these stubs type-hint. Ensure versions are compatible.","package":"boto3","optional":false}],"imports":[{"note":"The actual boto3 client does not export its type directly. You need to import the stub type from `mypy_boto3_route53`.","wrong":"from boto3.client import Route53Client","symbol":"Route53Client","correct":"from mypy_boto3_route53.client import Route53Client"},{"note":"Type definitions for response objects are found in the `type_defs` submodule.","symbol":"ListHostedZonesResponseTypeDef","correct":"from mypy_boto3_route53.type_defs import ListHostedZonesResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_route53 import Route53Client\nfrom mypy_boto3_route53.type_defs import ListHostedZonesResponseTypeDef\n\ndef get_hosted_zones() -> ListHostedZonesResponseTypeDef:\n    # boto3.client is untyped by default\n    client: Route53Client = boto3.client(\"route53\")\n    \n    response: ListHostedZonesResponseTypeDef = client.list_hosted_zones()\n    print(f\"Found {len(response.get('HostedZones', []))} hosted zones.\")\n    for zone in response.get('HostedZones', []):\n        print(f\"  - {zone.get('Name')} ({zone.get('Id')})\")\n    return response\n\nif __name__ == \"__main__\":\n    get_hosted_zones()","lang":"python","description":"This quickstart demonstrates how to initialize a Route53 client with type hints and retrieve a list of hosted zones. It explicitly types the `boto3` client and the API response, allowing `mypy` to validate usage and provide autocompletion."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If stuck on 3.8, pin to an older `mypy-boto3-route53` version (e.g., `<1.42.0`).","message":"Support for Python 3.8 has been removed across all `mypy-boto3-builder` generated packages. Projects still on Python 3.8 will encounter compatibility errors.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0 (and `mypy-boto3-route53` >= 1.42.0)"},{"fix":"Update your `TypeDef` imports and references according to the new naming scheme (e.g., `CreateDistributionRequestRequestTypeDef` might become `CreateDistributionRequestTypeDef`). Consult the `mypy-boto3-builder` release notes or regenerate your type-hinted code to identify changes.","message":"TypeDef naming conventions were changed in `mypy-boto3-builder`, resulting in shorter or re-ordered names for some type definitions. This will break code that explicitly imports or references `TypeDef` objects by their old names.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Ensure your `boto3` and `mypy-boto3-route53` package versions are compatible. Ideally, `mypy-boto3-route53`'s minor version should match `boto3`'s minor version (e.g., `mypy-boto3-route53==1.42.x` for `boto3==1.42.x`).","message":"These stubs are generated for specific `boto3` and `botocore` versions. Using a significantly different version of `boto3` can lead to discrepancies between the actual runtime behavior and the provided type hints, resulting in `mypy` errors or incorrect assumptions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Most users will not need a fix. If encountering `mypy` stub discovery issues, verify your `mypy` configuration and ensure stub packages are correctly installed in your environment.","message":"The `mypy-boto3-builder` ecosystem transitioned to PEP 561 compliance in version 8.12.0. While largely transparent, this could affect type checker discovery in complex setups or when using custom `MYPYPATH` configurations.","severity":"gotcha","affected_versions":"mypy-boto3-builder >= 8.12.0 (and `mypy-boto3-route53` >= 1.42.0)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}