Defaults

Report a typo

Сreate a simple library for books using the CBV approach in Flask with the following actions:

URL

Method

Description

/book

GET

Provides a list of books with their details

/book/book_title

GET

Shows a single book

Always use jsonify in the return method value

Write a program in Python 3
app = Flask(__name__)
books = [{
"Title":"Childhood",
"Author":"Dostoevsky"
},
{
"Title":"Amerika",
"Author":"Kafka"
}]
class Book(MethodView):
#put your code here
___

Create a free account to access the full topic