alexapy.aiohttp.resolver

Classes

  • ThreadedResolver: Use Executor for synchronous getaddrinfo() calls, which defaults to

  • AsyncResolver: Use the aiodns package to make asynchronous DNS lookups

  • DefaultResolver: Use Executor for synchronous getaddrinfo() calls, which defaults to

class alexapy.aiohttp.resolver.ThreadedResolver(loop: Optional[asyncio.events.AbstractEventLoop] = None)

Threaded resolver.

Uses an Executor for synchronous getaddrinfo() calls. concurrent.futures.ThreadPoolExecutor is used by default.

Inheritance

Inheritance diagram of ThreadedResolver

async close() None

Release resolver

async resolve(hostname: str, port: int = 0, family: int = AddressFamily.AF_INET) List[Dict[str, Any]]

Return IP address for given hostname

class alexapy.aiohttp.resolver.AsyncResolver(loop: Optional[asyncio.events.AbstractEventLoop] = None, *args: Any, **kwargs: Any)

Use the aiodns package to make asynchronous DNS lookups

Inheritance

Inheritance diagram of AsyncResolver

async close() None

Release resolver

async resolve(host: str, port: int = 0, family: int = AddressFamily.AF_INET) List[Dict[str, Any]]

Return IP address for given hostname

alexapy.aiohttp.resolver.DefaultResolver

alias of alexapy.aiohttp.resolver.ThreadedResolver