from flask import jsonify from flask.views import View from pycs.database.Project import Project class GetProjectModel(View): """ return the model used by a given project """ # pylint: disable=arguments-differ methods = ['GET'] def dispatch_request(self, project_id: int): # find project project = Project.get_or_404(project_id) # return model return jsonify(project.model)