In the last chapter, we discussed about databases and implemented NoSQL- and SQL-based examples. In this chapter we’ll be creating a RESTful Flask application from scratch. Here we’ll maintain a database of Author objects alongside the books they have written. This application will have a user authentication mechanism to only allow logged-in users to execute certain functions. We’ll now create the following API endpoints for our REST applications:
- 1.
GET /authors: This gets list of authors alongside their books.
- 2.
GET /authors/<id>: This gets author with the specified ID ...