Update README example
asvetlov opened this issue · 3 comments
I suggest updating README with using coroutine and making explicit yield from resolver.query('google.com','A')
.
I know your example is perfectly correct but loop.run_until_complete()
is not so obvious as yield from
.
It's kind of intentional. aiodns works also on Python 2 through Trollius, and we cannot use yield from there, whereas the current example works regardless of the Python version.
That said, I wouldn't oppse a Python 3 only example, in addition to the one we already have, if you're up for a PR.
Done.
See also http://stackoverflow.com/questions/30675026/sending-dns-queries-asynchronously-with-asyncio-and-dnspython
It's not blame for your library but sign: people sometimes need full-fledged async dns client.
Thanks! Yeah, c-ares is not very active these days... http://c-ares.haxx.se/mail/c-ares-archive-2014-05/0000.shtml
I hope that one day I can add another resolver implementation on top of getdns (https://getdnsapi.net/), supporting more RR types and general awesomeness.