algorithms.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:kge-server 作者: vfrico 项目源码 文件源码
def on_get(self, req, resp, algorithm_id):
        """Shows the representation of the selected algorithm

        :param int algorithm_id: The id of the algorithm
        """
        algorithm_dao = data_access.AlgorithmDAO()

        algorithm, err = algorithm_dao.get_algorithm_by_id(algorithm_id)
        if algorithm is None:
            raise falcon.HTTPNotFound(message=str(err))

        resp.body = json.dumps(algorithm)
        resp.content_type = 'application/json'
        resp.status = falcon.HTTP_200
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号