Package dns :: Module resolver |
[hide private]
[frames] | no frames]

# Module resolver

source code

DNS stub resolver.

Classes | [hide private]
| NXDOMAIN The query name does not exist.
| NoAnswer The response did not contain an answer to the question.
| NoNameservers No non-broken nameservers are available to answer the query.
| NotAbsolute Raised if an absolute domain name is required but a relative name was provided.
| NoRootSOA Raised if for some reason there is no SOA at the root name.
| NoMetaqueries Metaqueries are not allowed.
| Answer DNS stub resolver answer
| Cache Simple DNS answer cache.
| Resolver DNS stub resolver

Functions | [hide private]
get_default_resolver() Get the default resolver, initializing it if necessary. | source code
query(qname, rdtype=1, rdclass=1, tcp=False, source=None, raise_on_no_answer=True) Query nameservers to find the answer to the question. | source code
dns.name.Name |
zone_for_name(name, rdclass=1, tcp=False, resolver=None) Find the name of the zone which contains the specified name. | source code

Variables | [hide private]
dns.resolver.Resolver object | default_resolver = `None` The default resolver object
| __package__ = ``'``dns``'``

Function Details | [hide private]

### query(qname, rdtype=1, rdclass=1, tcp=False, source=None, raise_on_no_answer=True) | source code
Query nameservers to find the answer to the question. This is a convenience function that uses the default resolver object to make the query. See Also: dns.resolver.Resolver.query for more information on the parameters.

### zone_for_name(name, rdclass=1, tcp=False, resolver=None) | source code
Find the name of the zone which contains the specified name. Parameters: `name` (absolute dns.name.Name object or string) - the query name `rdclass` (int) - The query class `tcp` (bool) - use TCP to make the query (default is False). `resolver` (dns.resolver.Resolver object or None) - the resolver to use Returns: dns.name.Name