Asynchronous Resolver Functions

async dns.asyncresolver.resolve(qname: Union[dns.name.Name, str], rdtype: Union[dns.rdatatype.RdataType, str] = RdataType.A, rdclass: Union[dns.rdataclass.RdataClass, str] = RdataClass.IN, tcp: bool = False, source: Optional[str] = None, raise_on_no_answer: bool = True, source_port: int = 0, lifetime: Optional[float] = None, search: Optional[bool] = None, backend: Optional[dns._asyncbackend.Backend] = None) dns.resolver.Answer[source]

Query nameservers asynchronously to find the answer to the question.

This is a convenience function that uses the default resolver object to make the query.

See dns.asyncresolver.Resolver.resolve() for more information on the parameters.

async dns.asyncresolver.resolve_address(ipaddr: str, *args: Any, **kwargs: Any) dns.resolver.Answer[source]

Use a resolver to run a reverse query for PTR records.

See dns.asyncresolver.Resolver.resolve_address() for more information on the parameters.

async dns.asyncresolver.canonical_name(name: Union[dns.name.Name, str]) dns.name.Name[source]

Determine the canonical name of name.

See dns.resolver.Resolver.canonical_name() for more information on the parameters and possible exceptions.

async dns.asyncresolver.zone_for_name(name: Union[dns.name.Name, str], rdclass: dns.rdataclass.RdataClass = RdataClass.IN, tcp: bool = False, resolver: Optional[dns.asyncresolver.Resolver] = None, backend: Optional[dns._asyncbackend.Backend] = None) dns.name.Name[source]

Find the name of the zone which contains the specified name.

See dns.resolver.Resolver.zone_for_name() for more information on the parameters and possible exceptions.