3
Creating REST Web Services
Although Flask is a popular lightweight web framework, it can also support RESTful web service implementations. It has its own JSON encoders and decoders, built-in JSON support mechanisms for response generation and error handling, easy-to-manage RESTful request dispatching, and a lean configuration approach. Unlike the other API frameworks, Flask uses more modules and packages because of the required project structure it needs to maintain. However, after setting up the directory structure accordingly, the succeeding steps will be seamless, lightweight, and straightforward.
This chapter will introduce the part of the Flask framework that deals with building API endpoints to provide data and services to sub-modules ...
Get Mastering Flask Web and API Development 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.