Building RESTful Web APIs with Django

Building RESTful Web APIs with Django

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 09m | 259 MB

APIs are a crucial technology for delivering data to applications—from front-end ecommerce sites to iOS and Android apps. The Django REST framework is the natural choice for Python and Django developers who want to create their own RESTful back-end APIs. In addition to its rapid prototyping tools, the framework includes authentication schemes, serialization for parsing complex data into Python-friendly types, and automatic URL routing. This course shows how to use the Django Rest framework to create a simple RESTful web API. Instructor Rudolf Olah explains how to create serializers, renderers, filtering and pagination, and routers with viewsets that consumers can use to access the API. He also shows how to unit test your code to ensure your API works as expected. By the end of the course, you’ll know how to use this powerful and flexible toolkit to build you own data-driven web experiences.

Topics include:

  • Creating a serializer
  • Working with API views
  • Filtering back ends
  • Enabling pagination
  • Executing CRUD operations
  • Managing serializer fields
  • Testing API views
Table of Contents

Introduction
1 Create a REST API with Django and Django REST framework
2 What you should know
3 Demo project overview

Serializing Listing Filtering and Paginating Models
4 Creating a Django Rest framework serializer to serialize a model
5 Creating a ListAPIView subclass
6 Connecting an APIView to a route
7 Filter back ends with URL query parameters
8 Enabling full-text search filter back end
9 Enabling pagination of querysets in API responses

Create Retrieve Update and Delete (CRUD) Operations for Models
10 Creating a CreateAPIView subclass
11 Connecting a CreateAPIView to the router
12 Creating a DestroyAPIView subclass
13 Connecting a DestroyAPIView to the router
14 Creating an UpdateAPIView subclass
15 Connecting an UpdateAPIView to the router

Managing Serializer Fields Relations and Validation
16 Serializer with only selected fields
17 Serializer that shows model relationships
18 Number fields with serializers
19 Date and time fields with serializers
20 Lists dicts and JSON objects
21 Serializer with ImageField and FileField

Testing API Views
22 Test case for a CreateAPIView subclass
23 Test case for a DestroyAPIView subclass
24 Test case for a ListAPIView subclass
25 Unit test for an UpdateAPIView subclass
26 Handling image uploads in a unit test

Conclusion
27 Next steps