Install & Compatibility
Where this runs
tested against v1.0.0b2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.154s · 19.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.146s · 20MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
jit
✓ from deepfriedmarshmallow import jit
Decorator to JIT-compile a schema. Incorrect usage is importing from 'marshmallow' which doesn't exist.
JitSerializer
✓ from deepfriedmarshmallow import JitSerializer
Class for manual JIT serialization.
JitDeserializer
✓ from deepfriedmarshmallow import JitDeserializer
Class for manual JIT deserialization.
Create a Marshmallow schema, then create a subclass decorated with @jit to enable JIT compilation for faster load/dump.
from marshmallow import Schema, fields
from deepfriedmarshmallow import jit
class UserSchema(Schema):
name = fields.String()
age = fields.Integer()
@jit
class JitUserSchema(UserSchema):
pass
schema = JitUserSchema()
data = {"name": "Alice", "age": 30}
result = schema.load(data)
print(result) # {'name': 'Alice', 'age': 30}
result = schema.dump(result)
print(result) # {'name': 'Alice', 'age': 30}
Debug
Known issues
breakingDeepFriedMarshmallow requires Python >=3.11. Using Python 3.10 or older will cause import errors.fixUpgrade Python to 3.11 or later.
affects: <=1.1.2
gotchaThe @jit decorator must be applied to a class that inherits from a Marshmallow Schema. Applying it to a standalone class or a non-Schema will not work.fixEnsure the decorated class is a subclass of marshmallow.Schema.
affects: all
gotchaThe plugin system via DFM_PLUGINS environment variable or entry points may conflict if multiple plugins define the same inliner. The library prefers inliners in a specific order; custom plugins may be overridden.fixCheck plugin documentation and ensure unique inliner definitions.
affects: >=1.1.0
deprecatedIn version 1.0.0beta2, the API was unstable. The current stable API (1.1.x) uses the @jit decorator; the older API may have used different symbols.fixUpgrade to version 1.1.x and use @jit decorator.
affects: 1.0.0beta1 - 1.0.0beta2
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'deepfriedmarshmallow'
Library not installed or installed in a different environment.
fixRun 'pip install deepfriedmarshmallow'. Ensure you are using Python 3.11+.
TypeError: jit() missing 1 required positional argument: 'schema_class'
Used @jit on a function or incorrectly imported jit.
fixUse @jit as a class decorator on a Schema subclass, not on a function. Example: @jit class MySchema(Schema): ...
AttributeError: 'NoneType' object has no attribute 'fields'
The @jit decorator was applied to a class that does not inherit from Schema, or the schema was not defined correctly.
fixEnsure the decorated class inherits from marshmallow.Schema.
ValidationError: Unknown field.
When unknown=RAISE and the input contains a field not defined in the schema, the JIT deserializer may raise a ValidationError.
fixHandle the exception or set unknown=RAISE explicitly in schema Meta.
Upgrade
Version history
1.1.2latest on PyPI · released Sep 3, 2025
Audit
Dependencies
No dependency data recorded yet.