tools/api_key_tool.py
def has_api_key(file_name):
    """
    Detect whether the file contains an api key in the Token object that is not 40*'0'.
    See issue #86.
    :param file: path-to-file to check
    :return: boolean
    """
    f = open(file_name, 'r')
    text = f.read()
    if re.search(real_api_regex, text) is not None and  \
            re.search(zero_api_regex, text) is None:
        return True
    return False
def has_api_key(file_name):
    """
    Detect whether the file contains an api key in the Token object that is not 40*'0'.
    See issue #86.
    :param file: path-to-file to check
    :return: boolean
    """
    f = open(file_name, 'r')
    text = f.read()
    if re.search(real_api_regex, text) is not None and  \
            re.search(zero_api_regex, text) is None:
        return True
    return False
def has_api_key ( file_name ) : f = open ( file_name , 'r' ) text = f . read ( ) if re . search ( real_api_regex , text ) is not None and re . search ( zero_api_regex , text ) is None : return True return False
Detect whether the file contains an api key in the Token object that is not 40*'0'.
    See issue #86.
    :param file: path-to-file to check
    :return: boolean
Detect whether the file contains an api key in the Token object that is not 40 * 0 . See issue #86 . : param file : path - to - file to check : return : boolean