Skip to main content

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

Project description

marshmallow-dumped-order

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 dumped.data == '{"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.

Source Distribution

marshmallow-dumped-order-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file marshmallow-dumped-order-1.0.0.tar.gz.

File metadata

  • Download URL: marshmallow-dumped-order-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for marshmallow-dumped-order-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bf4aa174ba033d3b3d23a1f10405ea39ea95cf0ff9b41b2bba7b2b542376cf89
MD5 0e2a87101983b9a0524a70fa05e15523
BLAKE2b-256 7c8e965189c5038320c2ab40e050967a62a4bb32d729eb0a1c568a93d2c74d89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page