mypy-boto3-route53domains Type Stubs

1.42.3 · active · verified Sat Apr 11

mypy-boto3-route53domains provides type annotations for the boto3 Route53Domains service, generated with the mypy-boto3-builder. These stubs enable static type checking for your boto3 calls related to AWS Route53Domains, enhancing code quality and developer experience. The current version is 1.42.3, and updates are released frequently, typically mirroring boto3 releases and builder improvements.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to obtain a type-hinted boto3 Route53Domains client. The `mypy-boto3-route53domains` package provides the `Route53DomainsClient` type for accurate static analysis. Remember to have AWS credentials configured for actual API calls.

import boto3
from mypy_boto3_route53domains.client import Route53DomainsClient

def get_domains_client() -> Route53DomainsClient:
    """Get a typed Route53Domains client."""
    # boto3_client is actually an Any type without stubs
    # With mypy-boto3-route53domains installed, this is now typed
    boto3_client: Route53DomainsClient = boto3.client("route53domains")
    return boto3_client

if __name__ == "__main__":
    client = get_domains_client()
    print(f"Client type: {type(client)}")
    # Example operation (requires AWS credentials configured)
    try:
        response = client.list_domains()
        print(f"First domain: {response['Domains'][0]['DomainName']}")
    except Exception as e:
        print(f"Could not list domains (ensure AWS credentials are configured): {e}")

view raw JSON →