marshmallow-enum
Enum field for Marshmallow
What it is and what it does
marshmallow-enum adds an EnumField type to Marshmallow, the popular schema validation and serialization library. It handles conversion between Python Enum objects and their serialized forms (typically strings or values) during schema operations. The field integrates directly into Marshmallow schemas and supports customization of how enums are serialized (by name or by value) and deserialized independently.
The package is straightforward to use: define a Python Enum, declare it as an EnumField in a Marshmallow schema, and the field handles the rest. It supports custom error messages and flexible load/dump behavior. However, the package has been abandoned since August 2019 with no recent updates or maintenance, which may pose compatibility risks with newer Marshmallow or Python versions.
Use it for:
- Serialize API responses containing enum values to JSON with readable names or numeric values
- Validate incoming form or API data against a fixed set of enum choices in a schema
- Convert between enum names and values when loading/dumping data in web frameworks
- Define database models with enum fields that need schema-level serialization support
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides an Enum field type for Marshmallow schemas, enabling serialization and deserialization of Python Enum objects with customizable load/dump behavior.
Yes, if you are already using Marshmallow and need enum field support in an existing or stable codebase. The low install friction and permissive license make it a reasonable choice. However, be cautious: the package is unmaintained since 2019. Test compatibility with your Marshmallow and Python versions before adopting it in new projects, and monitor for any breaking changes in future Marshmallow releases.
Install
marshmallow-enum on PyPI
pip
pip install marshmallow-enumuv
uv add marshmallow-enumpoetry
poetry add marshmallow-enumInstalling marshmallow-enum
Before you install
Low friction install with a single runtime dependency (marshmallow). However, the package is abandoned—last release was 2019-08-21, over 2550 days ago. No recent maintenance or updates.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it safe for most projects from a licensing standpoint.
Quickstart
pip install marshmallow-enum
from enum import Enum
from marshmallow import Schema
from marshmallow_enum import EnumField
class Color(Enum):
red = 1
green = 2
class MySchema(Schema):
color = EnumField(Color)
schema = MySchema()
schema.dump({'color': Color.red}) # {'color': 'red'}
schema.load({'color': 'red'}) # {'color': Color.red}
Verify before relying
- Whether the package works with current Marshmallow versions (3.x+) despite being unmaintained
- Whether Python 3.10+ Enum changes affect compatibility
- Active community forks or maintained alternatives available
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — marshmallow |
| Maintenance | abandoned — 2,550 days since the last release |
| First released | |
| Downloads | 7,366,975/month — #1,749 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: marshmallow_enum-1.5.1-py2.py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
marshmallow-jsonschemaConverts marshmallow schemas into JSON Schema…
permissive · top 5,000 on PyPI
marshmallow-unionAdds union field support to marshmallow,…
permissive · top 5,000 on PyPI
django-enumProvides a Django model field type that stores…
permissive · top 15,000 on PyPI
django-enumfieldsProvides Django model fields that store Python…
permissive · top 15,000 on PyPI
marshmallow-polyfieldExtends Marshmallow with a PolyField class that…
permissive · top 15,000 on PyPI
django-choices-fieldProvides Django model fields that store and…
permissive · top 15,000 on PyPI
marshmallow-oneofschemaExtends marshmallow to handle polymorphic…
permissive · top 5,000 on PyPI
marshmallow-mongoengineGenerates marshmallow schemas automatically…
permissive · top 15,000 on PyPI
DeepFriedMarshmallowAccelerates Marshmallow schema serialization…
permissive · top 15,000 on PyPI
marshmallowMarshmallow converts complex Python objects to…
permissive · top 1,000 on PyPI