marshmallow-mongoengine
Mongoengine integration with the marshmallow (de)serialization library
Decision gist · record as of 2026-08-14
Yes, if you're already using mongoengine and marshmallow together. The package eliminates schema duplication and integrates cleanly with both libraries. However, note that the last release was 2023-03-14; verify compatibility with your specific versions of mongoengine and marshmallow before adopting, and monitor the repository for any compatibility issues with newer releases of those dependencies.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with only two runtime dependencies (mongoengine and marshmallow).
- Repository is active with a recent commit on 2026-08-01, though the last release was 2023-03-14, indicating the package is stable but not under active development.
License · maintenance · safety
MIT (permissive) — MIT licensed under a permissive license, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
last release 2023-03-14 (1249 days) · last repo commit 2026-08-01 · 76 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 148,926 downloads/mo, #11,012 on PyPI
Alternatives
Verify before relying
pip install marshmallow-mongoengine
import mongoengine as me
from marshmallow_mongoengine import ModelSchema
class Author(me.Document):
name = me.StringField()
class AuthorSchema(ModelSchema):
class Meta:
model = Author
author_schema = AuthorSchema()
author = Author(name='Test').save()
dump_data = author_schema.dump(author).data- Whether the package supports mongoengine versions released after 2023-03-14
- Compatibility with modern marshmallow versions and any breaking changes in recent releases
- Whether Python 3.9+ is supported despite classifiers only listing through 3.8
What it is and what it does
marshmallow-mongoengine bridges mongoengine (a MongoDB ODM for Python) and marshmallow (a serialization/deserialization library) by automatically generating marshmallow schemas from mongoengine document models. Instead of manually writing schema definitions, you declare your mongoengine models and then wrap them in a ModelSchema class that inherits the field structure automatically. This eliminates repetition when you need to serialize mongoengine documents to JSON, validate incoming data, or deserialize it back into document instances.
The package handles the common workflow of MongoDB applications: define a mongoengine Document, create a corresponding schema, then use dump() to serialize instances and load() to deserialize and validate incoming data. It's particularly useful in REST APIs and other contexts where you need consistent validation and serialization of MongoDB documents without writing schema definitions twice.
Use it for
- Building REST APIs backed by MongoDB that need automatic request/response serialization and validation
- Converting mongoengine documents to JSON for API responses without manual field mapping
- Validating incoming JSON data against mongoengine document structure before saving to MongoDB
- Reducing boilerplate by auto-generating marshmallow schemas from existing mongoengine models
- Handling nested document relationships (references, lists) in serialization workflows
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you're already using mongoengine and marshmallow together.
The package eliminates schema duplication and integrates cleanly with both libraries. However, note that the last release was 2023-03-14; verify compatibility with your specific versions of mongoengine and marshmallow before adopting, and monitor the repository for any compatibility issues with newer releases of those dependencies.
Install
marshmallow-mongoengine on PyPI
Before you install
Low friction install with only two runtime dependencies (mongoengine and marshmallow). Repository is active with a recent commit on 2026-08-01, though the last release was 2023-03-14, indicating the package is stable but not under active development.
License in practice
MIT licensed under a permissive license, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install marshmallow-mongoengine
import mongoengine as me
from marshmallow_mongoengine import ModelSchema
class Author(me.Document):
name = me.StringField()
class AuthorSchema(ModelSchema):
class Meta:
model = Author
author_schema = AuthorSchema()
author = Author(name='Test').save()
dump_data = author_schema.dump(author).data
Verify before relying
- Whether the package supports mongoengine versions released after 2023-03-14
- Compatibility with modern marshmallow versions and any breaking changes in recent releases
- Whether Python 3.9+ is supported despite classifiers only listing through 3.8
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesmongoenginemarshmallow |
| Maintenance | Actively maintained 1,249 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 148,926 / month, #11,012 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8 |
Evidence: marshmallow_mongoengine-0.31.2-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mongoengine marshmallow integration”
- marshmallow-mongoengineGenerates marshmallow schemas automatically from mongoengine document…
- mixerMixer generates test data and model instances for Django, SQLAlchemy,…
- flask-mongoengineFlask-MongoEngine integrates MongoEngine document models with Flask,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also marshmallow-sqlalchemy · flask-mongoengine · mongoengine · marshmallow-union · marshmallow-oneofschema · marshmallow-jsonschema · marshmallow · marshmallow-polyfield · amundsen-common · DeepFriedMarshmallow