fromflask_restfulimportResource,reqparse,abort,fields,marshal_withimportjsonclassSend(Resource):defsetup_request_parser(self):parser=reqparse.RequestParser()parser.add_argument("client_id",type=str,help="A unique name to identify the client")parser.add_argument("secret",type=str,help="A human friendly name to identify the client")parser.add_argument("topic",type=str,help="Publisher topic")parser.add_argument("content",type=str,help="The message")self.parser=parserdefparse(self):returnself.parser.parse_args()defput(self,client_id):args=clients_file.parse()client=clients_file.find(client_id)ifnotclient:abort(404,message="No client with id: {}".format(client_id))else:client=clients_file.update(args)returnclient,201