from flask import jsonify
from flask.views import View

from pycs.database.Model import Model


class ListModels(View):
    """
    get a list of all available models
    """
    # pylint: disable=arguments-differ
    methods = ['GET']


    def dispatch_request(self):
        return jsonify(Model.query.all())
