parameters: (host:str, auth=None)
return_statement: return (True, "Ok")
docstring: Test if the passed in string is a valid URI. Returns a tuple of a boolean and an explanation
docstring_summary: Test if the passed in string is a valid URI. Returns a tuple of a boolean and an explanation
docstring_tokens: Test if the passed in string is a valid URI . Returns a tuple of a boolean and an explanation
function: def is_valid_host(host:str, auth=None) -> Tuple[bool, str]:
      """Test if the passed in string is a valid URI. Returns a tuple of a boolean and an explanation
      """
      host = host.strip()
      if 0 == len(host):
          return (False, 'No URL provided')
      if '://' not in host:
          return (False, 'URL is missing protocol (http://...)')
      reachable, reason = is_reachable(host, auth)
      if not reachable:
          return (False, f'URL not reachable: {reason}')
      return (True, "Ok")
function_tokens: def is_valid_host ( host : str , auth = None ) -> Tuple [ bool , str ] : host = host . strip ( ) if 0 == len ( host ) : return ( False , 'No URL provided' ) if '://' not in host : return ( False , 'URL is missing protocol (http://...)' ) reachable , reason = is_reachable ( host , auth ) if not reachable : return ( False , f'URL not reachable: {reason}' ) return ( True , "Ok" )