{"id":23532,"library":"deepfriedmarshmallow","title":"DeepFriedMarshmallow","description":"A plug-and-play JIT compilation library for Marshmallow schemas that speeds up serialization and deserialization by generating optimized Python code. Current version is 1.1.2, compatible with Python >=3.11 and <4.0.0. The library is actively maintained with a plugin system and built-in inliners for common field types.","status":"active","version":"1.1.2","language":"python","source_language":"en","source_url":"https://github.com/mLupine/DeepFriedMarshmallow","tags":["marshmallow","jit","serialization","deserialization","performance"],"install":[{"cmd":"pip install deepfriedmarshmallow","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"Decorator to JIT-compile a schema. Incorrect usage is importing from 'marshmallow' which doesn't exist.","symbol":"jit","correct":"from deepfriedmarshmallow import jit"},{"note":"Class for manual JIT serialization.","symbol":"JitSerializer","correct":"from deepfriedmarshmallow import JitSerializer"},{"note":"Class for manual JIT deserialization.","symbol":"JitDeserializer","correct":"from deepfriedmarshmallow import JitDeserializer"}],"quickstart":{"code":"from marshmallow import Schema, fields\nfrom deepfriedmarshmallow import jit\n\nclass UserSchema(Schema):\n    name = fields.String()\n    age = fields.Integer()\n\n@jit\nclass JitUserSchema(UserSchema):\n    pass\n\nschema = JitUserSchema()\ndata = {\"name\": \"Alice\", \"age\": 30}\nresult = schema.load(data)\nprint(result)  # {'name': 'Alice', 'age': 30}\nresult = schema.dump(result)\nprint(result)  # {'name': 'Alice', 'age': 30}","lang":"python","description":"Create a Marshmallow schema, then create a subclass decorated with @jit to enable JIT compilation for faster load/dump."},"warnings":[{"fix":"Upgrade Python to 3.11 or later.","message":"DeepFriedMarshmallow requires Python >=3.11. Using Python 3.10 or older will cause import errors.","severity":"breaking","affected_versions":"<=1.1.2"},{"fix":"Ensure the decorated class is a subclass of marshmallow.Schema.","message":"The @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.","severity":"gotcha","affected_versions":"all"},{"fix":"Check plugin documentation and ensure unique inliner definitions.","message":"The 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.","severity":"gotcha","affected_versions":">=1.1.0"},{"fix":"Upgrade to version 1.1.x and use @jit decorator.","message":"In 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.","severity":"deprecated","affected_versions":"1.0.0beta1 - 1.0.0beta2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install deepfriedmarshmallow'. Ensure you are using Python 3.11+.","cause":"Library not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'deepfriedmarshmallow'"},{"fix":"Use @jit as a class decorator on a Schema subclass, not on a function. Example: @jit class MySchema(Schema): ...","cause":"Used @jit on a function or incorrectly imported jit.","error":"TypeError: jit() missing 1 required positional argument: 'schema_class'"},{"fix":"Ensure the decorated class inherits from marshmallow.Schema.","cause":"The @jit decorator was applied to a class that does not inherit from Schema, or the schema was not defined correctly.","error":"AttributeError: 'NoneType' object has no attribute 'fields'"},{"fix":"Handle the exception or set unknown=RAISE explicitly in schema Meta.","cause":"When unknown=RAISE and the input contains a field not defined in the schema, the JIT deserializer may raise a ValidationError.","error":"ValidationError: Unknown field."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}