t.n.client : module documentation

Part of twisted.names View Source

Asynchronous client DNS

The functions exposed in this module can be used for asynchronous name resolution and dns queries.

If you need to create a resolver with specific requirements, such as needing to do queries against a particular host, the createResolver function will return an IResolver.

Future plans: Proper nameserver acquisition on Windows/MacOS, better caching, respect timeouts

Class Resolver No summary
Class AXFRController Undocumented
Class ThreadedResolver Undocumented
Class DNSClientFactory Undocumented
Function createResolver Create and return a Resolver.
Function getResolver Get a Resolver instance.
Function getHostByName Resolve a name to a valid ipv4 or ipv6 address.
Function lookupAddress
Function lookupIPV6Address
Function lookupAddress6
Function lookupMailExchange
Function lookupNameservers
Function lookupCanonicalName
Function lookupMailBox
Function lookupMailGroup
Function lookupMailRename
Function lookupPointer
Function lookupAuthority
Function lookupNull
Function lookupWellKnownServices
Function lookupService
Function lookupHostInfo
Function lookupMailboxInfo
Function lookupText
Function lookupSenderPolicy
Function lookupResponsibility
Function lookupAFSDatabase
Function lookupZone
Function lookupAllRecords
Function lookupNamingAuthorityPointer
def createResolver(servers=None, resolvconf=None, hosts=None): (source)
Create and return a Resolver.
ParametersserversIf not None, interpreted as a list of domain name servers to attempt to use. Each server is a tuple of address in str dotted-quad form and int port number. (type: list of (str, int) or None)
resolvconfIf not None, on posix systems will be interpreted as an alternate resolv.conf to use. Will do nothing on windows systems. If None, /etc/resolv.conf will be used. (type: str or None)
hostsIf not None, an alternate hosts file to use. If None on posix systems, /etc/hosts will be used. On windows, C:\windows\hosts will be used. (type: str or None)
Returns (type: IResolver)
def getResolver(): (source)
Get a Resolver instance.

Create twisted.names.client.theResolver if it is None, and then return that value.

Returns (type: IResolver)
def getHostByName(name, timeout=None, effort=10): (source)
Resolve a name to a valid ipv4 or ipv6 address.

Will errback with DNSQueryTimeoutError on a timeout, DomainError or AuthoritativeDomainError (or subclasses) on other errors.

ParametersnameDNS name to resolve. (type: str)
timeoutNumber of seconds after which to reissue the query. When the last timeout expires, the query is considered failed. (type: Sequence of int)
effortHow many times CNAME and NS records to follow while resolving this name. (type: int)
Returns (type: Deferred)
def lookupAddress(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupAddress
def lookupIPV6Address(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupIPV6Address
def lookupAddress6(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupAddress6
def lookupMailExchange(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupMailExchange
def lookupNameservers(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupNameservers
def lookupCanonicalName(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupCanonicalName
def lookupMailBox(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupMailBox
def lookupMailGroup(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupMailGroup
def lookupMailRename(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupMailRename
def lookupPointer(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupPointer
def lookupAuthority(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupAuthority
def lookupNull(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupNull
def lookupWellKnownServices(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupWellKnownServices
def lookupService(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupService
def lookupHostInfo(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupHostInfo
def lookupMailboxInfo(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupMailboxInfo
def lookupText(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupText
def lookupSenderPolicy(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupSenderPolicy
def lookupResponsibility(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupResponsibility
def lookupAFSDatabase(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupAFSDatabase
def lookupZone(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupZone
def lookupAllRecords(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupAllRecords
def lookupNamingAuthorityPointer(name, timeout=None): (source)
See Alsotwisted.internet.interfaces.IResolver.lookupNamingAuthorityPointer
API Documentation for Twisted, generated by pydoctor at 2013-04-03 11:20:05.