Asynchronous I/O Support — dnspython 2.8.0 documentation (original) (raw)
The dns.asyncquery
and dns.asyncresolver
modules offer asynchronous APIs equivalent to those of dns.query
anddns.resolver
.
Dnspython presents a uniform API, but offers three different backend implementations, to support the Trio, Curio, and asyncio libraries. Dnspython attempts to detect which library is in use by using thesniffio
library if it is available. It’s also possible to explicitly select a “backend” library, or to pass a backend to a particular call, allowing for use in mixed library situations.
Note that Curio is not supported for DNS-over-HTTPS, due to a lack of support in the anyio library used by httpx.
- DNS Query Support
- Stub Resolver
- The dns.asyncresolver.Resolver Class
* Resolver
* Resolver.canonical_name()
* Resolver.resolve()
* Resolver.resolve_address()
* Resolver.resolve_name()
* Resolver.try_ddr() - Asynchronous Resolver Functions
* resolve()
* resolve_address()
* resolve_name()
* canonical_name()
* try_ddr()
* zone_for_name()
* make_resolver_at()
* resolve_at()
* default_resolver
* get_default_resolver()
* reset_default_resolver()
- The dns.asyncresolver.Resolver Class
- Asynchronous Backend Functions