def removeEmbed(hash, publc, pl_id, vid_id): x = Playlists() # create a hash m = md5.new(pl_id + publc + _private_key()) if m.hexdigest() == hash: param = { 'pl_id': pl_id, 'vid_id': vid_id } bool = x.removeEmbed(param) dat = { 'response' : bool } else: dat = { 'response': 'failed' } return dat