skillfed

desert

Deserialize to objects while staying DRY

desert v2022.9.22 130.6K downloads/30d#11,636 on PyPI161
Permissive license Abandoned released

What it is and what it does

Desert bridges dataclasses and attrs with marshmallow by automatically generating serialization schemas from your class definitions. Instead of writing both a dataclass and a separate marshmallow schema, you define your data structure once and Desert creates the schema for you. It handles nested objects, type-variant generics (Sequence, Mapping, etc.), and optional fields, reducing boilerplate while keeping your code DRY.

The package wraps marshmallow under the hood, so you get all of marshmallow's validation and serialization power without duplicating field definitions. It supports both dataclasses and attrs classes, making it useful for projects that use either or both. However, the project is no longer maintained—the last commit was in 2023 and no updates have been released since 2022, so you should consider whether you're comfortable adopting abandoned software.

Use it for:

  • Automatically generate marshmallow schemas for dataclass-based APIs to avoid writing duplicate field definitions
  • Deserialize JSON into nested dataclass instances with automatic type validation and conversion
  • Use type-variant generics (Sequence, Mapping) in dataclasses while still getting proper serialization support
  • Reduce boilerplate when building data pipelines that need both type safety and serialization

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Desert generates marshmallow serialization schemas automatically from dataclasses and attrs classes, eliminating the need to write separate schema definitions.

Yes, if you're working with dataclasses or attrs and need marshmallow serialization without schema duplication—the low install friction and permissive license make it easy to try. However, proceed with caution: the package is abandoned and no longer maintained, so you should verify it works with your current dependency versions and be prepared to fork or migrate if issues arise.

Install

desert on PyPI

pip

pip install desert

uv

uv add desert

poetry

poetry add desert

Installing desert

Before you install

Low install friction with only 4 runtime dependencies (marshmallow, attrs, typing-inspect, dataclasses). However, the package is abandoned—last commit was 2023-04-27 and no releases since 2022-09-23, so maintenance is no longer active.

License in practice

Licensed under MIT (permissive), so you can use it freely in commercial and private projects without restriction.

Quickstart

pip install desert

from dataclasses import dataclass
import desert

@dataclass
class Person:
    name: str
    age: int

schema = desert.schema(Person)
data = {'name': 'Alice', 'age': 21}
person = schema.load(data)

Verify before relying

  • Whether the package still works reliably with current versions of marshmallow and attrs despite being abandoned
  • Whether string annotations and forward references limitation affects your use case

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 4 — marshmallow, attrs, typing-inspect, dataclasses
Maintenance abandoned — 1,421 days since the last release
Last repo commit
First released
Downloads 130,603/month — #11,636 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: desert-2022.9.22-py3-none-any.whl

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Utilities

Tags

dataclass serialization schemaattrs deserializationautomatic marshmallow schemaDRY serializationdataclass to dict conversion
serializationdataclass-helper

More Utilities packages