November 2014
Intermediate to advanced
258 pages
5h 15m
English
In the previous recipe, Creating an extension-based REST interface, we saw how to create a REST API interface using an extension that was dependent on SQLAlchemy. Now, we will use an extension called Flask-Restful, which is written over Flask pluggable views and is independent of ORM.
First, we will start with the installation of the extension:
$ pip install Flask-Restful
We will modify the catalog application from the previous recipe to add a REST interface using this extension.
As always, we will start with changes to our application's configuration, which will look something like the following lines of code:
from flask.ext.restful import Api api = Api(app)
Here, app is our Flask ...
Read now
Unlock full access