Use Twisted and dnspython to deal with DNS data.
Latest commit 4511741 Sep 6, 2011 @jcollie Add some documentation
Failed to load latest commit information.
examples add an example Sep 5, 2011
src/txdnspython Add some documentation Sep 5, 2011
.gitignore Add some documentation Sep 5, 2011
LICENSE initial commit Sep 5, 2011 initial commit Sep 5, 2011
README.markdown Add some documentation Sep 5, 2011 initial commit Sep 5, 2011


Twisted / DNS Python

txdnspython is a way to use dnspython to create and manipulate DNS messeages and then send those messages over the network using Twisted's asynchronous networking.

dnspython has two interfaces for sending DNS data over the network - dns.resolver.query and the tcp, udp, and xfr methods in the dns.query module. txdnspython currently can replace the dns.query.tcp and dns.query.udp methods from dnspython.

An Example

Here's an example of how to send a query (the code can be found in examples/

from twisted.internet import reactor

import txdnspython

import dns.message

def printresult(result):
    print result

def printerror(reason):
    print reason

client = txdnspython.UdpDnsClient(reactor, '')

query_response = client.send_query(dns.message.make_query('', 'A'))

Running the Examples

The example code can be run like this:

PYTHONPATH=src python examples/

Generating API Documentation

From the root of the source tree run this command:

PYTHONPATH=src epydoc --html txdnspython

You'll need epydoc installed of course.