from typing import Union, Optional, Iterator
class Name:
    def to_text(self, omit_final_dot: bool = ...) -> str: ...
class Rdata:
    target: Name = ...
    port: int = ...
class Answer:
    def __iter__(self) -> Iterator[Rdata]: ...
def resolve(qname : str, rdtype : Union[int,str] = 0,
            rdclass : Union[int,str] = 0,
            tcp=False, source=None, raise_on_no_answer=True,
            source_port=0, lifetime : Optional[float]=None,
            search : Optional[bool]=None) -> Answer: ...
def query(qname : str, rdtype : Union[int,str] = 0,
          rdclass : Union[int,str] = 0,
          tcp=False, source: Optional[str] = None, raise_on_no_answer=True,
          source_port=0, lifetime : Optional[float]=None) -> Answer: ...
