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

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page