def on_get(self, req: falcon.Request, resp: falcon.Request, book_id: ByteString): """ :param req: A request object :param resp: A response object :param book_id: book_id received in http path to query book object :return: """ # Query book collection to get a record with id = book_id book_obj = Book.objects.get(id=book_id) # It will set response body as a json object of book fields. resp.body = json.dumps({'author':book_obj.author,'name':book_obj.name,'isbn':book_obj.isbn}) # Finally return 200 response on success resp.status = falcon.HTTP_200