restapi.models.schema.Schema.get_attribute

Schema.get_attribute(obj, attr, default)[source]

Defines how to pull values from an object to serialize.

Added in version 2.0.0.

Changed in version 3.0.0a1: Changed position of obj and attr.

Parameters:
  • obj (Any)

  • attr (str)

  • default (Any)