MCPcopy Create free account
hub / github.com/rthalley/dnspython / resolve

Function resolve

dns/asyncresolver.py:285–317  ·  view source on GitHub ↗

Query nameservers asynchronously to find the answer to the question. This is a convenience function that uses the default resolver object to make the query. See :py:func:`dns.asyncresolver.Resolver.resolve` for more information on the parameters.

(
    qname: dns.name.Name | str,
    rdtype: dns.rdatatype.RdataType | str = dns.rdatatype.A,
    rdclass: dns.rdataclass.RdataClass | str = dns.rdataclass.IN,
    tcp: bool = False,
    source: str | None = None,
    raise_on_no_answer: bool = True,
    source_port: int = 0,
    lifetime: float | None = None,
    search: bool | None = None,
    backend: dns.asyncbackend.Backend | None = None,
)

Source from the content-addressed store, hash-verified

283
284
285async def resolve(
286 qname: dns.name.Name | str,
287 rdtype: dns.rdatatype.RdataType | str = dns.rdatatype.A,
288 rdclass: dns.rdataclass.RdataClass | str = dns.rdataclass.IN,
289 tcp: bool = False,
290 source: str | None = None,
291 raise_on_no_answer: bool = True,
292 source_port: int = 0,
293 lifetime: float | None = None,
294 search: bool | None = None,
295 backend: dns.asyncbackend.Backend | None = None,
296) -> dns.resolver.Answer:
297 """Query nameservers asynchronously to find the answer to the question.
298
299 This is a convenience function that uses the default resolver
300 object to make the query.
301
302 See :py:func:`dns.asyncresolver.Resolver.resolve` for more
303 information on the parameters.
304 """
305
306 return await get_default_resolver().resolve(
307 qname,
308 rdtype,
309 rdclass,
310 tcp,
311 source,
312 raise_on_no_answer,
313 source_port,
314 lifetime,
315 search,
316 backend,
317 )
318
319
320async def resolve_address(

Callers

nothing calls this directly

Calls 2

get_default_resolverFunction · 0.70
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…