Releases: gera2ld/async_dns
Releases · gera2ld/async_dns
v2.0.0
Features
- Added a dedicated DNS client for raw requests (#25):
import asyncio
from async_dns.core import types, Address
from async_dns.resolver import DNSClient
async def query():
client = DNSClient()
res = await client.query('www.google.com', types.A,
Address.parse('8.8.8.8'))
print(res)
print(res.aa)
asyncio.run(query())
Breaking Changes
-
resolver.query
now returns two items:message, from_cache = await resolver.query(hostname, types.A)
message
is the result of the DNS look up and has a type of DNSMessage.from_cache
is a boolean representing whether the result is read from the resolver cache. -
resolver.query
no longer eats exceptions so the caller should take care of them.