Building RESTful Web APIs with Django
1h 9mIntermediate2019-03-27
Authors

Rudolf Olah
Full-Stack Web Developer
Course details
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.
Learning objectives
Creating a serializer
Working with API views
Filtering back ends
Enabling pagination
Executing CRUD operations
Managing serializer fields
Testing API views
Learning objectives
Creating a serializer
Working with API views
Filtering back ends
Enabling pagination
Executing CRUD operations
Managing serializer fields
Testing API views
Skills covered
DjangoAPIsBack-End Web DevelopmentFull-Stack Web DevelopmentPythonProjectWeb DevelopmentOpen SourceSoftware Development
Concepts
0. Introduction
- 01 - Create a REST API with Django and Django REST framework
- 02 - What you should know
- 03 - Demo project overview
1. Serializing, Listing, Filtering, and Paginating Models
- 04 - Creating a Django Rest framework serializer to serialize a model
- 05 - Creating a ListAPIView subclass
- 06 - Connecting an APIView to a route
- 07 - Filter back ends with URL query parameters
- 08 - Enabling full-text search filter back end
- 09 - Enabling pagination of querysets in API responses
2. 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
3. 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
4. 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