{"id":6480,"library":"types-aiobotocore-route53","title":"Type Annotations for aiobotocore Route53","description":"Provides static type checking for `aiobotocore`'s Route53 service using `mypy`. It enhances asynchronous AWS operations in Python by offering precise type hints for clients, requests, and responses. The project is actively maintained, with frequent releases that often align with `boto3`/`aiobotocore` updates and `mypy-boto3-builder` improvements.","status":"active","version":"3.4.0","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type hints","aws","aiobotocore","route53","mypy","async"],"install":[{"cmd":"pip install types-aiobotocore-route53","lang":"bash","label":"Install library"}],"dependencies":[{"reason":"Provides the underlying asynchronous AWS client library for which these are type stubs.","package":"aiobotocore"}],"imports":[{"note":"The primary type for the Route53 client obtained from aiobotocore session.","symbol":"Route53Client","correct":"from types_aiobotocore_route53 import Route53Client"},{"note":"Literal type for the service name 'route53', commonly used with `session.create_client()`.","symbol":"Route53ServiceName","correct":"from types_aiobotocore_route53 import Route53ServiceName"},{"note":"Example of importing a TypedDict for a service response payload.","symbol":"ListHostedZonesResponseTypeDef","correct":"from types_aiobotocore_route53.type_defs import ListHostedZonesResponseTypeDef"}],"quickstart":{"code":"import asyncio\nfrom aiobotocore.session import get_session\nfrom types_aiobotocore_route53 import Route53Client, Route53ServiceName\nfrom types_aiobotocore_route53.type_defs import ListHostedZonesResponseTypeDef, HostedZoneSummaryTypeDef\n\nasync def main():\n    # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials)\n    session = get_session()\n    async with session.create_client(Route53ServiceName.route53) as client: # type: Route53Client\n        print(f\"Successfully created Route53 client: {type(client)}\")\n        try:\n            response: ListHostedZonesResponseTypeDef = await client.list_hosted_zones()\n            print(f\"Number of hosted zones: {len(response['HostedZones'])}\")\n            for zone: HostedZoneSummaryTypeDef in response['HostedZones']:\n                print(f\"  ID: {zone['Id']}, Name: {zone['Name']}, Public: {not zone['Config']['PrivateZone']}\")\n        except Exception as e:\n            print(f\"An error occurred: {e}\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n","lang":"python","description":"This quickstart demonstrates how to use `types-aiobotocore-route53` to provide type hints for an `aiobotocore` Route53 client. It initializes an asynchronous client and fetches a list of hosted zones, leveraging the provided TypedDicts for type-safe access to the response structure."},"warnings":[{"fix":"Upgrade to Python 3.9+ or pin `types-aiobotocore-route53` to a version prior to 3.4.0 (e.g., `<3.4.0`).","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0 (which generated `types-aiobotocore-route53` version 3.4.0). Users on Python 3.8 will need to pin to an older version of the stubs.","severity":"breaking","affected_versions":">=3.4.0"},{"fix":"Review your code for any direct references to TypeDef names and update them according to the new naming conventions. Refer to the specific service's `type_defs.pyi` for current names.","message":"TypedDict names for service request/response arguments changed significantly in `mypy-boto3-builder` version 8.9.0. Names were shortened (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and `Extra` postfixes moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":">=3.1.0"},{"fix":"Ensure both `aiobotocore` and `types-aiobotocore-route53` are listed in your project's dependencies.","message":"These are type stubs for `aiobotocore`. You must install `aiobotocore` itself (`pip install aiobotocore`) in addition to `types-aiobotocore-route53` for your code to run at runtime. The type stubs only provide static analysis.","severity":"gotcha","affected_versions":"All"},{"fix":"Regularly update both `aiobotocore` and `types-aiobotocore-route53`. If issues arise, try aligning their major/minor versions closely.","message":"While `types-aiobotocore` aims to be compatible with `aiobotocore`, significant version mismatches between the stubs and the runtime library can lead to incorrect type checking or runtime errors. For best results, keep their versions relatively synchronized.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}