This video aims at presenting how to implement the Create operation (from CRUD) using Flask and SQLAlchemy, and how to apply best practices to Create.
- [Instructor] Hi and welcome to the third video…of Section Two: Implementing Create.…In the previous video, we looked at SQLAlchemy…and how to use it with MySQL.…In this video, we are going to take a look…at the characteristics of the Create operation…when implementing in RESTful API.…After that, we will review the code…and see how this can be used installed in Flask.…The Create operation should always be mapped…to the HTTP POST method.…RESTful API should always return meaningful…instruction for writing HTTP codes.…Like HTTP 201 - Created if everything went well,…or HTTP 500 if the server encountered an error…while handling the Create request.…
In case of a successful Create operation,…the response should contain the access path…for the newly created entity.…This helps the API to comply…with the requirements of hyper media.…Last but not least,…RESTful requests should be always authenticated.…Great, we covered all the theoretical parts.…Now let's see and analyse how the Create method…is implemented in our application.…
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