The dns.asyncresolver.Resolver Class¶
The async resolver is a subclass of
dns.resolver.Resolver and has the
same attributes. The methods are similar, but I/O methods like
Asynchronous DNS stub resolver.
stror file object, specifying a file in standard /etc/resolv.conf format. This parameter is meaningful only when configure is true and the platform is POSIX.
bool. If True (the default), the resolver instance is configured in the normal fashion for the operating system the resolver is running on. (I.e. by reading a /etc/resolv.conf file on POSIX systems and from the registry on Windows systems.)
Determine the canonical name of name.
The canonical name is the name the resolver uses for queries after all CNAME and DNAME renamings have been applied.
str, the query name.
This method can raise any exception that
resolve()can raise, other than
resolve(qname, rdtype=<RdataType.A: 1>, rdclass=<RdataClass.IN: 1>, tcp=False, source=None, raise_on_no_answer=True, source_port=0, lifetime=None, search=None, backend=None)¶
Query nameservers asynchronously to find the answer to the question.
None, the default, then dnspython will use the default backend.
dns.resolver.Resolver.resolve()for the documentation of the other parameters, exceptions, and return type of this method.
resolve_address(ipaddr, *args, **kwargs)¶
Use an asynchronous resolver to run a reverse query for PTR records.
This utilizes the resolve() method to perform a PTR lookup on the specified IP address.
str, the IPv4 or IPv6 address you want to get the PTR record for.
All other arguments that can be passed to the resolve() function except for rdtype and rdclass are also supported by this function.