Skip to main content

Decorator for `marshmallow.Schema` to sort fields in needed order while dumping

Project description


PyPI version Build Status codecov

Decorator for marshmallow.Schema to sort fields in needed order while dumping (python36+).

from marshmallow import Schema, fields
from marshmallow_dumped_order import dumped_order

@dumped_order("name", "age")
class User(Schema):
    age = fields.Int()
    name = fields.String()

dumped = User().dumps({"age": 356, "name": "Jarvis"})

assert == '{"name": "Jarvis", "age": 356}'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for marshmallow-dumped-order, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size marshmallow-dumped-order-1.1.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page