from bottle import route, run from bottle import post, get, put, delete, request, response import json books = [ {'id': 1, 'title': 'book 1'}, {'id': 2, 'title': 'book 2'}, {'id': 3, 'title': 'book 3'}, ] @get('/books') def books_list(): response.headers['Content-Type'] = 'application/json' response.headers['Cache-Control'] = 'no-cache' return json.dumps(books) @get('/books/<id:int>') def a_book(i