bookshop web service app flask(__name__app json_encoder bookjsonencoder now if we wish to encode single book or list of books the above encoder will be used automatically and thus we do not need to do anything else thus our earlier examples can be written to simply by referencing the book or bookshop books attributejsonify({'book'book}jsonify({'books'bookshop books} setting up the get services we can now set up the two services that will support get requeststhese are the /book/list and /book services the functions that these urls map to are given below@app route('/book/list'methods=['get']def get_books()return jsonify({'books'bookshop books}@app route('/book/'methods=['get']def get_book(isbn)book bookshop get(isbnreturn jsonify({'book'book}the first function merely returns the current list of books held by the bookshop in json structure using the key books the second function takes an isbn number as parameter this is url parameterin other words part of the url used to invoke this function is actually dynamic and will be passed into the function this means that user can request details of books with different isbns just by changing the isbn element of the urlfor example/book/ will indicate that we want information on the book with the isbn /book/ will indicate we want information on the book with isbn in flask to indicate that something is url parameter rather than hard coded element of the urlwe use angle brackets (these surround the url parameter name and allow the parameter to be passed into the function (using the same name