NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2568 most downloaded on PyPI
A dataclasses serializer for Django REST Framework
Last release 1 years ago
14 May 2025
Release timing varies
gaps range from 2 weeks to 1.7 years
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
17 releases · first in 2019
Support type aliases defined using the type statement (PEP 695).
Features & fixes:
child_fields parameter of UnionField to accept Field subclasses.Fix inclusion of py.typed in wheel.
Features & fixes:
One column per quarter.
The type annotations now require mypy 1.0 or higher to validate correctly.
Breaking changes:
Features & fixes:
list or dict composite types (such as frozenset or OrderedDict) as that type, instead of list or dict.serializer_field_mapping dictionary.rest_framework.fields.empty sentinel value when used in non-partial mode. This fixes occasional leaks of the sentinel into dataclasses returned to the user, for example when a DataclassSerializer was nested inside a regular serializer. Not setting, and later stripping, the sentinels also increases performance.init=False.save() on serializers with many=True.source='*'.child_kwargs defined in dataclass field metadata (as opposed to extra_kwargs field on Meta subclass).Allow all types, including special forms such as unions, to have their field type overridden through the serializer_field_mapping dictionary.
serializer_field_mapping dictionary.None as optional if they consist of three or more members. Previously this was only the case for unions with two members (i.e. only unions of a type with None were optional).Fix usage of PEP 585 generics with forward references (e.g. list["str"] ).
list["str"]).allow_empty with many=True.Allow using the new X | None union syntax for specifying optional fields in Python 3.10+ (PEP 604).
Features & fixes:
X | None union syntax for specifying optional fields in Python 3.10+ (PEP 604).Allow serialization of properties created using @property decorator.
Features & fixes:
@property decorator.DataclassSerializer (usually a Field).Fix EnumField compatibility with drf-yasg.
Features & fixes:
EnumField compatibility with drf-yasg.The serializer field for dataclass fields that have a default value or default value factory, are now marked as optional (required=False).
Breaking changes:
required=False).typing.Optional no longer causes the serializer fields to be optional (they will still be marked as nullable). In previous versions these fields would be optional, which broke if a field had no default value. Due to the preceding change, the common case of fields marked with typing.Optional and None as a default value, have no change in behaviour.typing.Final type hints (without the type specified), as typing.Final was never supposed to be used in this way, and Python 3.10 will drop support for it.Features & fixes:
serializer_field_mapping.serializer_dataclass_field property.many=True.…value for unsupplied fields. This reverts the breaking change from v0.7.
Breaking changes:
Features & fixes:
The validated_data representation now contains the rest_framework.fields.empty sentinel value for fields where no value was provided, instead of the d
Breaking changes:
validated_data representation now contains the rest_framework.fields.empty sentinel value for fields where no value was provided, instead of the default of the dataclass field. The value returned by save() is unchanged. This was necessary to support partial updates.Features & fixes:
list and dict typehints.max_digits and decimal_places for DecimalField.Rewrite to save() implementation to finally fix all issues with nested serializers.
save() implementation to finally fix all issues with nested serializers.source option.fields option.Make optional fields on the dataclass optional on the serializer as well.
many=True.extra_kwargs.fields option.Automatically recognize Literal-typed fields (PEP 586).
Literal-typed fields (PEP 586).Automatically recognize UUID fields.
Support arbitrary nesting of dictionaries and lists.
__all__ magic option in fields option on Meta class.* Initial release.
Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →