def _base64_unicode(value):
 as_bytes = base64.b64encode(value)
 return as_bytes.decode('ascii')

def _base64_unicode ( value ) : as_bytes = base64 . b64encode ( value ) return as_bytes . decode ( 'ascii' )
helper to base64 encode and make json serializable .