def index(): """ Return a list of tables and their corresponding API examples. """ response = "" for table in config.TABLE_SCHEMA.keys(): response = response + disco.examples(table) return response
def discovery(): """ Discover information about the tables on this API endpoint. """ table = flask.request.args.get('table') response = 'Invalid table:'+str(table) status = 404 response = disco.examples(table) if response: status = 200 return flask.Response(response, status=status)