DNS toolkit for Python supporting almost all record types with high-level and low-level DNS operations
85
Provide a context-managed override that routes Python's socket-level hostname lookups through a configurable DNS resolver built with the dependency. The override must be reversible and safe for repeated use.
socket.getaddrinfo calls to resolve via that resolver instead of OS defaults. @test@generates
from __future__ import annotations
from typing import Iterable, Optional
class SystemResolverOverride:
def __init__(self, nameservers: Iterable[str], *, timeout: Optional[float] = None, search: Optional[Iterable[str]] = None) -> None: ...
def activate(self) -> None: ...
def restore(self) -> None: ...
def __enter__(self) -> "SystemResolverOverride": ...
def __exit__(self, exc_type, exc, tb) -> None: ...
@property
def active(self) -> bool: ...Provides resolver override hooks to route Python socket DNS lookups through configurable nameservers. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-dnspythondocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10