--- id: deepfriedmarshmallow version: "1.1.2" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # DeepFriedMarshmallow — A plug-and-play JIT implementation for Marshmallow to speed up data serialization and deserialization License: permissive · Maintenance: aging · Downloads: 195.6K/mo ## What it is and what it does Deep-Fried Marshmallow is a JIT compiler layer for Marshmallow that generates optimized serialization and deserialization code at runtime. Instead of relying on Marshmallow's reflection-heavy approach, it introspects your schema once and produces fast, specialized code paths for dump and load operations. The package is a maintained fork of the abandoned Toasted Marshmallow project, updated to work with modern Marshmallow versions (3.13+) without requiring modifications to Marshmallow itself. You enable it by either inheriting from JitSchema instead of Schema, calling deep_fry_marshmallow() globally to patch all schemas, or using the JitSchemaMixin for custom base classes. It also supports a plugin system for custom field inliners and JIT behaviors. The generated code optimistically assumes valid input and falls back to standard Marshmallow behavior on errors, so it's designed to be a drop-in replacement with no API changes. Use it for: - High-throughput REST APIs where serializing thousands of objects per second matters for latency and throughput. - Data pipelines that repeatedly dump and load the same schema structures, where JIT compilation amortizes well. - Microservices with strict latency budgets that need faster JSON serialization without rewriting validation logic. - Replacing Toasted Marshmallow in existing projects that need ongoing maintenance and compatibility with recent Marshmallow releases. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Accelerates Marshmallow schema serialization and deserialization by generating optimized code at runtime, achieving 3-5x speedup over vanilla Marshmallow without changing the API. Yes, with conditions. Install if you have a Marshmallow-based codebase where serialization is a measured bottleneck and you can test the speedup on your actual schemas. The low install friction and permissive license make adoption easy. However, the aging maintenance status (10 stars, last commit 2025-09-03) and modest adoption signal mean you should verify compatibility with your Marshmallow version and monitor the project for future updates before relying on it in production. ## Install pip install deepfriedmarshmallow uv add deepfriedmarshmallow poetry add deepfriedmarshmallow ## Installing DeepFriedMarshmallow Before you install: Low install friction with three lightweight runtime dependencies (attrs, marshmallow, six). Maintenance status is aging—last commit was 2025-09-03 and the project has 10 stars, so adoption is modest and forward momentum unclear. License in practice: Licensed under Apache-2.0 (permissive), so you can use it freely in commercial and open-source projects without copyleft obligations. Quickstart: pip install DeepFriedMarshmallow from marshmallow import fields from deepfriedmarshmallow import JitSchema class ArtistSchema(JitSchema): name = fields.Str() schema = ArtistSchema() result = schema.dump({"name": "Artist Name"}) Requires Python 3.11 or later; Marshmallow version 3.13 or newer. Verify before relying: - Whether the 3-5x speedup claim is reproducible across real-world schemas and workloads beyond the benchmark shown. - Current stability and compatibility with Marshmallow versions released after the package's last update. - Whether the plugin system is actively used or documented in production deployments. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 195.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags marshmallow performance optimization, faster json serialization, jit schema compilation, marshmallow speedup, data serialization acceleration, schema jit compiler, marshmallow dump load faster, performance-optimization, serialization [View on SkillFed](https://skillfed.io/packages/deepfriedmarshmallow) · [View on PyPI](https://pypi.org/project/deepfriedmarshmallow/)