Marshmallow

4.2.3 · active · verified Sat Mar 28

Marshmallow is a lightweight library for converting complex datatypes to and from native Python datatypes. The current version is 4.2.3, released on March 28, 2026. It follows a regular release cadence, with updates approximately every few months.

Warnings

Install

Imports

Quickstart

A simple example demonstrating how to define a schema and load data using Marshmallow.

from marshmallow import Schema, fields

class UserSchema(Schema):
    name = fields.Str()
    email = fields.Email()
    created_at = fields.DateTime()

user_data = {
    'name': 'Monty',
    'email': 'monty@python.org',
    'created_at': '2014-08-17T14:54:16.049594+00:00'
}

schema = UserSchema()
result = schema.load(user_data)
print(result)

view raw JSON →