def format_header_line(key, value, as_strings=False):
    """
    Format key, value pair as an 80 character RAW header line.
    
    Parameters
    ----------
    key : str
        Header key
    value : str or int or float
        Header value
    as_strings : bool
        If values are already formatted strings, pass True
        
    Returns
    -------
    line : str
        Formatted line
    """
    if as_strings:
        if "\'" in value:
            line = f"{key:<8}= {value:<20}"
        else:
            line = f"{key:<8}= {value:>20}"
    else:
        if isinstance(value, str):
            value = f"'{value: <8}'"
            line = f"{key:<8}= {value:<20}"
        else:
            if key == 'TBIN':
                value = f"{value:.14E}"
            line = f"{key:<8}= {value:>20}"
    line = f"{line:<80}"
    return line