Summary

In this chapter, we added a simple REST API to our app using the Flask-Restless extension. We then used JavaScript and Ajax to integrate our frontend with the API, allowing users to view and post new comments, all without writing a single line of view code.

In our next chapter, we will work on creating apps that are testable and find ways to improve our code for this purpose. This will also allow us to verify that the code we have written is doing what we would like it to do; nothing more, nothing less. Automating this will give you confidence and ensure that the RESTful API is working as expected.

Get Learning Flask Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.