desert
Deserialize to objects while staying DRY
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 desertuv
uv add desertpoetry
poetry add desertInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
dataclasses-jsonschemaGenerates JSON Schema from Python dataclasses…
permissive · top 15,000 on PyPI
djangorestframework-dataclassesAutomatically generates Django REST Framework…
permissive · top 5,000 on PyPI
warchant_dc_schemaGenerates JSON Schema (2020-12 draft) from…
permissive · top 15,000 on PyPI
attrsattrs is a Python library that automatically…
permissive · top 100 on PyPI
hologramGenerates Draft 7 compatible JSON Schemas…
permissive · top 5,000 on PyPI
tinselGenerates PySpark DataFrame schemas from Python…
permissive · top 15,000 on PyPI
py-avro-schemaGenerates Apache Avro schemas from Python…
permissive · top 15,000 on PyPI
dataclasses-avroschemaGenerates Avro schemas from Python dataclasses,…
permissive · top 5,000 on PyPI
dataclasses-jsonConverts Python dataclasses to and from JSON…
permissive · top 1,000 on PyPI
renewGenerates reproducible string representations…
permissive · top 15,000 on PyPI