Develop RESTful web services using the Flask micro-framework and integrate them using MySQL. Use Flask to develop, deploy, and manage REST APIs with easy-to-read and understand Python code. Solve your problem from a choice of libraries. Learn to use MySQL as the web services database for your Flask API using SQLAlchemy ORM.
Building REST APIs with Flask provides a primer on Flask, RESTful services, and working with pip to set up your virtual environment. The key differences between NoSQL and SQL are covered, and you are taught how to connect MySQL and Flask using SQLAlchemy. Author Kunal Relan presents best practices for creating REST APIs and guides you in structuring your app and testing REST endpoints. He teaches you how to set up authentication and render HTML using views. You learn how to write unit tests for your REST APIs, and understand mocks, assertions, and integration testing. You will know how to document your REST APIs, deploy your Flask application on all of the major cloud platforms, and debug and monitor your Flask application.
What You'll Learn Who This Book Is For Python developers interested in REST API development using Flask and web developers with basic programming knowledge who want to learn how Python and REST APIs work together. Readers should be familiar with Python (command line, or at least pip) and MySQL.
The author provides me with an acceptable picture of how API in Flask should be implemented. I don't really like his vocabulary choice, and sometimes vague way of defining things. What are "tough in some situations" with a pre-defined schema in SQL? What are horizontal scaling and vertical scaling ? Is providing an example definition with a few letters that difficult? But yeah, the author does provide helpful information on the best practices: use environment variables. Instructed popular must-have tools and libraries: Postman. Alongside that was some suggestions (but did not explain): Swagger, API Designer Flask-specific libraries included: blueprint, marshmallow, middlewares, JWT AUTHENTICATION!!! (what a boon for an ardent hater of DRF's token authentication like me), His act of splitting error responses into separate variables instead of hard-coding is what I like most. He gave code examples for both Mongo and SQL database. And his deployment guide was comprehensive. i liked how he guided me through deploying on Ubuntu server, unlike some other superficial guiders who want the world to be trapped into Heroku. For a Django fan switching to Flask, this good is very good read for me personally despite some insignificant drawbacks. Would say 4.5 star, but since I can't find it 5 star because he deserves it.
This entire review has been hidden because of spoilers.
The book is well written though the code in it had a couple of annoying bugs that were really irritating. I wish the code editors/reviewers could have done a better job on that front.