Using Tastypie to create API

Tastypie is a framework for Django to create web service Application Program Interface (API). It supports full GET/POST/PUT/DELETE/PATCH HTTP methods to deal with online resources. It also supports different types of authentication and authorization, serialization, caching, throttling, and so on. In this recipe, you will learn how to provide bulletins to third parties for reading, that is, we will implement only the GET HTTP method.

Getting ready

First of all, install Tastypie in your virtual environment using the following command:

(myproject_env)$ pip install django-tastypie

Add Tastypie to INSTALLED_APPS in the settings. Then, enhance the bulletin_board app that we defined in the Creating filterable RSS feeds recipe. ...

Get Web Development with Django Cookbook - 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.