Mashumaro

Latest version: v3.15

Safety actively analyzes 714919 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 12

3.6

Changes
--------
* Added JSON Schema generation functionality 🎉 (see [documentation](https://github.com/Fatal1ty/mashumaro#json-schema))
* Draft 2022-12 and OpenAPI Specification 3.1.0
* Validation keywords using typing.Annotated
* No mixin required

3.5

Changes
--------
* Added possibility to define a generic serialization method for a generic type by registering a method for its origin type
* Improved support for third-party generic types by writing a generic `SerializationStrategy` ([details](https://github.com/Fatal1ty/mashumaro#third-party-generic-types))
* Improved writing `SerializationStrategy` methods by optional `use_annotations=True` ([details](https://github.com/Fatal1ty/mashumaro#third-party-types))
* Classes defining `__class_getitem__` methods will now be treated as generic types according to PEP 560

3.4

Changes
--------
* Added support for `typing.DefaultDict` / `collections.defaultdict`
* Added support for generic `TypedDict` and generic `NamedTuple`
* Speeded up the generated code for deserialization of fields that could be None

3.3.1

Changes
--------
* Fixed `UnresolvedTypeReferenceError`when postponed annotations were used and parent generic dataclass was defined in different module. See https://github.com/Fatal1ty/mashumaro/issues/90.
* Fixed recursion error for self-referenced generic dataclasses. See https://github.com/Fatal1ty/mashumaro/issues/91.
* Fixed inconsistent application of serialization_strategy appeared in version 3.2. See https://github.com/Fatal1ty/mashumaro/issues/93.

3.3

Changes
--------
* Added ability to use annotations inside `SerializableType` to simplify dealing with generic types (see [updated documentation](https://github.com/Fatal1ty/mashumaro#serializabletype-interface))
* Added support for user-defined variadic generic types and dataclasses, `TypeVarTuple` and `Unpack` from PEP 646
* Fixed serialization / deserialization of `Tuple[()]` on python 3.11
* Changed type name for `Tuple[T, ...]` from `"Tuple[T, Ellipsis]"` to `"Tuple[T, ...]"`

3.2

Changes
--------
* Added support for PEP 655
* Added skipping `None` value fields on serialization to TOML format. See https://github.com/Fatal1ty/mashumaro/issues/85.
* Added new [`omit_none`](https://github.com/Fatal1ty/mashumaro#omit_none-config-option) config option
* Added new [`omit_none`](https://github.com/Fatal1ty/mashumaro#omit_none-dialect-option) dialect option
* Removed allowance to pass `None` values to fields that can't be `None` according to their type
* Speeded up the generated code
* Dropped Python 3.6 support

Page 3 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.