def delete(id): """ Apaga aluno com id informado""" try: repositorio_alunos.delete(get_datastore_session(), repositorio_alunos.get(get_datastore_session(), id)) return "Elemento Apagado" except ValueError: return None
def update(id): """ Atualiza aluno com id informado""" application = repositorio_alunos.update(get_datastore_session(), repositorio_alunos.get(get_datastore_session(), id), **request.json) return json.dumps(application, cls=JSONEncoder)
def get_id(id): """ Busca um aluno com id informado""" application = repositorio_alunos.get(get_datastore_session(), id) return json.dumps(application, cls=JSONEncoder)