Flask - WebSocket and Real-Time
Given the code snippet:
What URL path will return the list of books?
from flask_restx import Api, Namespace, Resource
from flask import Flask
app = Flask(__name__)
api = Api(app)
ns = Namespace('books', description='Book related operations')
@ns.route('/list')
class BookList(Resource):
def get(self):
return {'books': ['Book1', 'Book2']}
api.add_namespace(ns)
if __name__ == '__main__':
app.run()What URL path will return the list of books?
