def get_ip() -> str:
    """
    Fetch local runtime IP address.

    Returns:
        str: IP address

    """
    import socket  # lazy imports

    host = socket.gethostname()
    try:
        public_ip = socket.gethostbyname(host)
    except Exception:
        public_ip = socket.gethostbyname("localhost")
    return public_ip

    Fetch local runtime IP address.

    Returns:
        str: IP address

    
llama-index-integrations/readers/llama-index-readers-pebblo/llama_index/readers/pebblo/utility.py