def encoded_contents(filename):
    with open(filename, 'r') as f:
        return base64.b64encode(bytearray(f.read(), 'utf-8')).decode('utf-8')
def encoded_contents(filename):
    with open(filename, 'r') as f:
        return base64.b64encode(bytearray(f.read(), 'utf-8')).decode('utf-8')