def create_info_endpoint(self, name, data):
<EOL>data = make_serializable(data)<EOL>class InfoBase(Resource):<EOL><INDENT>@staticmethod<EOL>def get():<EOL><INDENT>return data<EOL><DEDENT><DEDENT>def info_factory(name):<EOL><INDENT>"""<STR_LIT>"""<EOL>class NewClass(InfoBase):<EOL><INDENT>pass<EOL><DEDENT>NewClass.__name__ = "<STR_LIT>".format(name, InfoBase.__name__)<EOL>return NewClass<EOL><DEDENT>path = '<STR_LIT>'.format(name)<EOL>self.api.add_resource(info_factory(name), path)<EOL>logger.info('<STR_LIT>'.format(path))<EOL>logger.debug('<STR_LIT>'.format(path, data))<EOL>
Create an endpoint to serve info GET requests.