The aim of this video is to present how to implement the Read operation from CRUD using SQLAlchemy and Flask.
- [Narrator] Hi, and welcome to the last video…of the second section, Implementing Read.…In the previous video, we implemented…the create CRUD operation.…In this video we take another step and implement Read.…In this video, we are going to take a look at the…characteristics of Read CRUD operations in RESTful APIs,…and we will review the source code for implementing Read.…The main characteristics of Read operation is that…we need to make it possible thru HTTP GET requests.…The GET methods in a REST API should be idempotent,…which means that the underlying data will not change,…even if we invoke the GET requests as many times as we want.…
Now, we open the route.py file, and we take a look…at the init_api_routes method.…We will see how the GET method for…candidate entities is defined.…We can see the GET method is configured…to run the candidate method once.…The api/candiates route is accessed.…We will support getting dynamic parameters…like the candidate's ID.…The candidate and candidate_by_id method…from the middleware.py hold the logic…
Regardless of platform, you will need to build APIs to serve data between different client applications and endpoints. Good APIs are a necessity for web and mobile projects, especially with the modern, mobile-first approach to development. This course delivers the fundamental knowledge required to enable highly connected interactions between applications via RESTful web APIs. Follow along with Gergo Bogdan and learn how to build up and structure an effective web API that can be used by any client application accessing it over HTTP, using Flask, the Python microframework.
Find out how to implement CRUD operations using SQLAlchemy and MySQL as the data store. Get an understanding of how REST works relative to APIs, and learn how to test APIs written in Python with the support of Flask. Explore token-based authentication and find out how to store passwords securely in your database. Along the way, Gergo introduces best practices and design guidelines when building large applications.
- Setting up Flask
- Using Flask templates and routing
- Implementing CRUD operations
- Implementing pagination
- Configuring RESTful authentication
- HTTP caching
- Securing web APIs
- Testing the application