Reading more

Flask-Restless supports a number of configuration options that, in the interests of space, could not be covered in this chapter. The search filters are a very powerful tool, and we only scratched the surface of what is possible. Additionally, the pre and postprocessing hooks can be used to implement a number of interesting features such as the following:

  • Authentication, which can be implemented in the preprocessor
  • Default filters for GET_MANY, which could be used to restrict the list of comments to those that are public, for instance
  • Adding custom or calculated values to the serialized response
  • Modifying incoming POST values to set default values on the model instance

If REST API is a key component in your application, I strongly suggest ...

Get Learning Flask Framework 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.