$npx skillfedfor your agent

djangorestframework-dataclasses

A dataclasses serializer for Django REST Framework

With conditionsPyPI Python ModulesReleased May 20252.8M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — djangorestframework_dataclasses-1.4.0-py3-none-any.whl
v1.4.0 · released 2025-05-14 · Python >=3.7 · 3 runtime deps: django, djangorestframework, typing_extensions

Yes, if you use dataclasses as your primary data model layer in Django REST Framework projects. The package is stable and permissively licensed, with low install friction. The 457-day release gap suggests slower maintenance, so verify compatibility with your Django and DRF versions before adopting; otherwise it is a solid fit for eliminating serializer boilerplate.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django 3.2+ and Django REST Framework 3.11+; Python 3.7+ (description lists 3.8+ as tested minimum).
  • Low friction install with three straightforward runtime dependencies (django, djangorestframework, typing_extensions).
  • Maintenance status is aging—last release was 457 days ago—but the repository remains active and marked Production/Stable.

License · maintenance · safety

permissive license (permissive) — BSD-3-clause license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2025-05-14 (457 days) · last repo commit 2025-05-14 · 468 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,838,854 downloads/mo, #2,867 on PyPI

Verify before relying

pip install djangorestframework-dataclasses

from dataclasses import dataclass
from djangorestframework_dataclasses.serializers import DataclassSerializer

@dataclass
class Person:
    name: str
    email: str

class PersonSerializer(DataclassSerializer):
    class Meta:
        dataclass = Person
  • Whether the 457-day gap since last release indicates active maintenance or dormancy relative to Django/DRF release cycles.
  • Support status for the latest versions of Django and Django REST Framework beyond what the description guarantees.
  • Full scope of type annotations supported beyond str, bool, int, float, date, datetime, time, timedelta, Decimal, UUID, Enum, Iterable, Mapping, Literal, Union, and django.db.Model.
Same gist for agents: .md · .json

What it is and what it does

This package provides a DataclassSerializer that automatically generates Django REST Framework serializer fields from dataclass type annotations. Instead of manually declaring each field twice—once in the dataclass and again in a DRF Serializer—you define the dataclass with type hints and let the serializer introspect it. The package handles common Python types (str, bool, int, float, date, datetime, time, timedelta, Decimal, UUID, Enum, Literal, Union, Iterable, Mapping) and generates corresponding REST Framework fields, respecting optional fields, nullable types, and read-only markers.

It follows the ModelSerializer pattern familiar to Django developers: you specify the dataclass in a Meta subclass, optionally override or add fields, and get create() and update() implementations for free. The serializer works with the standard DRF workflow—calling .data for serialized output, .validated_data for deserialized instances, and save() to persist or update objects. This is most useful in projects that use dataclasses for domain models or DTOs rather than Django ORM models.

Use it for

  • Serialize and deserialize dataclass-based domain models in REST APIs without duplicating field definitions.
  • Build REST endpoints that accept and return typed dataclass instances instead of raw dictionaries.
  • Reduce boilerplate when working with dataclasses as request/response DTOs in Django views or viewsets.
  • Automatically validate incoming data against dataclass type annotations and constraints.
  • Migrate from ModelSerializer-based APIs to dataclass-based architectures with minimal refactoring.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use dataclasses as your primary data model layer in Django REST Framework projects.

The package is stable and permissively licensed, with low install friction. The 457-day release gap suggests slower maintenance, so verify compatibility with your Django and DRF versions before adopting; otherwise it is a solid fit for eliminating serializer boilerplate.

Install

djangorestframework-dataclasses on PyPI

Before you install

Low friction install with three straightforward runtime dependencies (django, djangorestframework, typing_extensions). Maintenance status is aging—last release was 457 days ago—but the repository remains active and marked Production/Stable.

Requires Django 3.2+ and Django REST Framework 3.11+; Python 3.7+ (description lists 3.8+ as tested minimum).

License in practice

BSD-3-clause license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install djangorestframework-dataclasses

from dataclasses import dataclass
from djangorestframework_dataclasses.serializers import DataclassSerializer

@dataclass
class Person:
    name: str
    email: str

class PersonSerializer(DataclassSerializer):
    class Meta:
        dataclass = Person

Verify before relying

  • Whether the 457-day gap since last release indicates active maintenance or dormancy relative to Django/DRF release cycles.
  • Support status for the latest versions of Django and Django REST Framework beyond what the description guarantees.
  • Full scope of type annotations supported beyond str, bool, int, float, date, datetime, time, timedelta, Decimal, UUID, Enum, Iterable, Mapping, Literal, Union, and django.db.Model.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
djangodjangorestframeworktyping_extensions
MaintenanceAging 457 days since the last release
Last repo commit
First released
Downloads2,838,854 / month, #2,867 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: djangorestframework_dataclasses-1.4.0-py3-none-any.whl

Tags

Capabilities
dataclass serializer django rest frameworkautomatic serializer generation dataclassesdjango rest framework dataclass supportserialize dataclasses drfdataclass to rest serializerdjango dataclass serialization
Topics
django-rest-frameworkdataclass-serializationapi-development

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “dataclass serializer django rest framework”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also dataclasses · drf-pydantic · django-typomatic · jax-dataclasses · desert · drf-extra-fields · serpyco-rs · drf-flex-fields · rest-framework-generic-relations · dataclasses-json