from typing import Union

class Extractor:
    def __init__(
        self,
        *,
        private: bool = True,
        loopback: bool = True,
        broadcast: bool = True,
        ipv4: bool = True,
        ipv6: bool = True,
    ) -> None: ...
    def only_public(self) -> "Extractor": ...
    def ignore_private(self) -> "Extractor": ...
    def ignore_loopback(self) -> "Extractor": ...
    def ignore_broadcast(self) -> "Extractor": ...
    def ipv4(self, include: bool) -> "Extractor": ...
    def ipv6(self, include: bool) -> "Extractor": ...
    def private_ips(self, include: bool) -> "Extractor": ...
    def loopback_ips(self, include: bool) -> "Extractor": ...
    def broadcast_ips(self, include: bool) -> "Extractor": ...
    def extract(self, text: Union[str, bytes]) -> list[str]: ...
    def extract_unique(self, text: Union[str, bytes]) -> list[str]: ...
    def extract_with_offsets(
        self, text: Union[str, bytes]
    ) -> list[tuple[str, int, int]]: ...

def extract(text: Union[str, bytes]) -> list[str]: ...
def extract_unique(text: Union[str, bytes]) -> list[str]: ...
