Improving Our API and Adding Authentication to it with Flask

In this chapter, we will improve the capabilities of the RESTful API that we started in the previous chapter and we will add authentication-related security to it. We will do the following:

  • Improve unique constraints in the models
  • Understand the differences between the PUT and the PATCH methods
  • Update fields for a resource with the PATCH method
  • Code a generic pagination class
  • Add pagination features to the API
  • Understand the steps to add authentication and permissions
  • Add a user model
  • Create a schema to validate, serialize, and deserialize users
  • Add authentication to resources
  • Create resource classes to handle users
  • Run migrations to generate the user table
  • Compose requests with ...

Get Hands-On RESTful Python Web Services - Second Edition 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.