import base64


def string_to_base64(string):
    """
    Encodes a string in base64 (> str)
    """
    string_bytes = string.encode('ascii')
    base64_encoded = base64.b64encode(string_bytes)
    base64string = base64_encoded.decode('ascii')
    return base64string