MCPcopy
hub / github.com/marshmallow-code/marshmallow / QuoteSchema

Class QuoteSchema

performance/benchmark.py:35–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35class QuoteSchema(Schema):
36 id = fields.Int(dump_only=True)
37 author = fields.Nested(AuthorSchema, validate=must_not_be_blank)
38 content = fields.Str(required=True, validate=must_not_be_blank)
39 posted_at = fields.DateTime(dump_only=True)
40 book_name = fields.Str()
41 page_number = fields.Float()
42 line_number = fields.Float()
43 col_number = fields.Float()
44
45 @post_dump
46 def add_full_name(self, data, **kwargs):
47 data["author_full"] = "{}, {}".format(
48 data["author"]["last"], data["author"]["first"]
49 )
50 return data
51
52
53class Author:

Callers 1

run_timeitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…