NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #689 most downloaded on PyPI
Fast and well tested serialization library
Last release 3 days ago
30 Sep 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
95 releases · first in 2018
Support for all types from pathlib
pathlibos.PathLike will be deserialized into an instance of that classos.PathLike will be deserialized into an instance of PurePath class: PurePosixClass on posix, PureWindowsPath in windowsRaise InvalidFieldValue with details in case deserialization fails.
InvalidFieldValue with details in case deserialization fails.One column per quarter.
In the previous versions if a data class had been derived from another data class with a default_factory, MissingField would have been raised on insta
In the previous versions if a data class had been derived from another data class with a default_factory, MissingField would have been raised on instantiation without field value provided as it shown in the following example:
@dataclass()
class A(DataClassJSONMixin):
foo: List[str] = field(default_factory=list)
@dataclass()
class B(A):
pass
print(B.from_dict({})) # MissingField: Field "foo" of type typing.List[str] is missing in __main__.B instance
Thanks to @ian-sentropy who found this bug.
Features -------- * Support Python 3.9
In the version 1.12 if you inherit both Enum and SerializableType classes you will get an exception TypeError: metaclass conflict: the metaclass of a
In the version 1.12 if you inherit both Enum and SerializableType classes you will get an exception TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases like in the following example:
class Example(IntEnum, SerializableType):
A = 1
B = 2
def _serialize(self):
return {"value": self.name}
@classmethod
def _deserialize(cls, value):
return Example.__members__[value["value"]]
In the version 1.11 if a data class without annotations had been derived from another data class, KeyError would have been raised as it shown in the f
In the version 1.11 if a data class without annotations had been derived from another data class, KeyError would have been raised as it shown in the following example:
@dataclass
class A:
a: int
@dataclass
class B(A, DataClassDictMixin):
pass
# ...
# KeyError: '__annotations__'
In the previous versions there was a problem in case one data class is derived from another data class that have default values. If any ancestor had h
In the previous versions there was a problem in case one data class is derived from another data class that have default values. If any ancestor had had a field with a default value, constructing an instance from a dictionary without that field would've been failed as it shown in the following example:
@dataclass
class A:
a: int
b: int = 123
@dataclass
class B(A, DataClassDictMixin):
c: int = 456
B.from_dict({'a': 111, 'c': 222}) # mashumaro.exceptions.MissingField: Field "b" of type builtins.int is missing in __main__.B instance
Add support for classes implementing the os.PathLike interface
os.PathLike interfaceAdd support for timezone class instances
timezone class instancesFeatures -------- * Support Python 3.8
Features -------- * Ignore ClassVars and InitVars
Fix type hints for DataClassJSONMixin, DataClassMessagePackMixin, DataClassYAMLMixin classes
Fix installation on platforms with encoding other than utf8 (closes https://github.com/Fatal1ty/mashumaro/issues/5)
Add support for user defined classes using SerializableType and SerializationStrategy interfaces located in the new mashumaro.types module
SerializableType and SerializationStrategy interfaces located in the new mashumaro.types moduleRoundedDecimal class for the decimals with specified precisionMissingField from Exception to LookupErrorUnserializableDataError from Exception to TypeErrorUnserializableDataError exception for weird types of fieldsto_dict and from_dict methods up to 40% in some casesAdd support for Decimal class instances
Decimal class instancesFraction class instancesSecurity fix for pyyaml (see https://github.com/Fatal1ty/mashumaro/pull/3)
Add ability to use external json encoder/decoder
Nothing published for this version
Add support for empty dataclasses
from_dict methodRemove default_packer in msgpack serialization
to_yaml methodFirst stable version Other changes ------------- * Add more tests * Refactor some things
First stable version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →