Flask-RESTful is an extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. Flask-RESTful encourages best practices with minimal setup. If you are familiar with Flask, Flask-RESTful should be easy to pick up. Flask-RESTful provides an extension to Flask for building REST APIs. Flask-RESTful was initially developed as an internal project at Twilio, built to power their public and internal APIs. Flask-RESTful understands multiple kinds of return values from view methods. Similar to Flask, you can return any iterable and it will be converted into a response, including raw Flask response objects. Flask-RESTful also support setting the response code and response headers using multiple return values.
Features
- The main building block provided by Flask-RESTful are resources
- Resources are built on top of Flask pluggable views, giving you easy access to multiple HTTP methods
- Flask-RESTful understands multiple kinds of return values from view methods
- You can return any iterable and it will be converted into a response
- Flask-RESTful also support setting the response code and response headers using multiple return values
- By default, all fields in your return iterable will be rendered as-is