skillfed

marshmallow

A lightweight library for converting complex datatypes to and from native Python datatypes.

marshmallow Permissive license MIT Active 7,241 v4.3.1 released

Install

marshmallow on PyPI

pip

pip install marshmallow

uv

uv add marshmallow

poetry

poetry add marshmallow

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — backports-datetime-fromisoformat, typing-extensions
Maintenance actively maintained — 5 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: marshmallow-4.3.1-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

About marshmallow

from the package's own PyPI description — quoted content, verbatim


marshmallow: simplified object serialization


|pypi| |build-status| |pre-commit| |docs|

.. |pypi| image:: https://badgen.net/pypi/v/marshmallow :target: https://pypi.org/project/marshmallow/ :alt: Latest version

.. |build-status| image:: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml/badge.svg :target: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml :alt: Build status

.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/marshmallow-code/marshmallow/dev.svg :target: https://results.pre-commit.ci/latest/github/marshmallow-code/marshmallow/dev :alt: pre-commit.ci status

.. |docs| image:: https://readthedocs.org/projects/marshmallow/badge/ :target: https://marshmallow.readthedocs.io/ :alt: Documentation

.. start elevator-pitch

marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.

.. code-block:: python

from datetime import date
from pprint import pprint

from marshmallow...

Read as markdown · JSON record · Source repository

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

marshmallow converts complex Python objects to and from native Python datatypes, enabling validation, deserialization, and serialization for APIs and data interchange.

Low friction installation with only two lightweight runtime dependencies (backports-datetime-fromisoformat and typing-extensions). Actively maintained with a release 5 days ago and strong community engagement (7241 GitHub stars).

MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.

Usage

pip install marshmallow

from marshmallow import Schema, fields

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

schema = UserSchema()
result = schema.dump({'name': 'Alice', 'email': 'alice@example.com'})

Requires Python 3.10 or later.

Verdict: marshmallow is a mature, well-maintained serialization library with no known vulnerabilities, permissive licensing, and minimal dependencies. It is production-ready and widely adopted for data validation and API integration.

Needs verification

  • Performance characteristics for large-scale serialization workloads compared to alternatives
  • Specific use cases where backports-datetime-fromisoformat is required versus optional
object serialization deserializationdata validation schemajson serialization pythonorm agnostic data conversionapi request validationdataclass to dict conversionschema based validation

Similar packages