The :py:class:`Channel <tdns.Channel>` implements a Python class for interacting with the c-ares API using native Tornado asynchronous conventions. For example, to query the MX records for google you could use the following snippet:
from tornado import gen, ioloop, web
import tdns
class RequestHandler(web.RequestHandler):
@gen.coroutine
def get(self, *args, **kwargs):
channel = tdns.Channel(io_loop=ioloop.IOLoop.current())
response = yield channel.query('google.com', 'MX')
tnds is build on top of the excellent pycares library.
.. autoclass:: tdns.Channel :members: :inherited-members:
.. autofunction:: tdns.reverse_address