Skip to Main Content
Python API Development Fundamentals
book

Python API Development Fundamentals

by Jack Chan, Ray Chung, Jack Huang
November 2019
Beginner to intermediate content levelBeginner to intermediate
372 pages
6h 24m
English
Packt Publishing
Content preview from Python API Development Fundamentals

5. Object Serialization with marshmallow

Learning Objectives

By the end of this chapter, you will be able to:

  • Create a schema for serialization/deserialization
  • Validate the data in a client request
  • Perform data filtering before displaying the data to the client
  • Use the HTTP PATCH method to partially update data

This chapter covers serialization and deserialization, as well as data filtering and validation with marshmallow.

Introduction

In this era of information explosion, the correctness of data is crucially important. We need to ensure that the data passed in by the client is in the format we expect. For example, we expect the cooking time variable to be a data type integer with a value of 30, but the client could pass in a string ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Build REST APIs with Django REST Framework and Python

Build REST APIs with Django REST Framework and Python

Shubham Sarda
The Complete Python Course

The Complete Python Course

Jose Salvatierra Fuentes, Codestars By Rob Percival

Publisher Resources

ISBN: 9781838983994Supplemental Content