© Kunal Relan 2019
Kunal RelanBuilding REST APIs with Flaskhttps://doi.org/10.1007/978-1-4842-5022-8_3

3. CRUD Application with Flask (Part 1)

Kunal Relan
(1)
New Delhi, Delhi, India
 
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. 1.
    GET /authors: This gets list of authors alongside their books.
     
  2. 2.
    GET /authors/<id>: This gets author with the specified ...

Get Building REST APIs with Flask: Create Python Web Services with MySQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.