import base64


def download_link(object_to_download, filename, download_link_text):
    """
    Generates a link to download the given object_to_download.
    Args:
        object_to_download: str.
        filename: str. filename and extension of file.
        download_link_text: str. Text to display for download link.

    Examples:
        download_link(our_string, 'my_file.txt', 'Click here to download your text!')

    """
    # some strings <-> bytes conversions necessary here
    b64 = base64.b64encode(object_to_download.encode()).decode()

    return f'<a href="data:file/txt;base64,{b64}" download="{filename}">{download_link_text}</a>'