tdns

An asynchronous Tornado wrapper for pycares


Keywords
tornado dns
License
BSD-3-Clause
Install
pip install tdns==0.2.0

Documentation

tdns

An asynchronous Tornado pycares DNS client wrapper, exporting the full API.

Version Downloads PythonVersions Status Coverage Code Climate

Documentation is available at tdns.readthedocs.io.

Example

from tornado import gen, ioloop
import tdns

loop = ioloop.IOLoop()
channel = tdns.Channel(io_loop=loop)

@gen.coroutine
def on_start():
    response = yield channel.query('google.com', tdns.QUERY_TYPE_MX)
    print(response)
    loop.stop()


loop.add_callback(on_start)
loop.start()