# konradhalas/dacite

Simple creation of data classes from dictionaries.

Repository: https://github.com/konradhalas/dacite
Canonical: https://ross.abutalabs.com/products/dacite
Language: Python
License: MIT
License Family: permissive
Topics: dataclasses
Last push: 2025-03-17T15:25:37+00:00

## Health v2 (maintenance only)
Score: 39/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 11, release rhythm 40, longevity 100
- inputs: {"age_days": 3105, "days_push": 534, "days_rel": 574, "gap_med": 3.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2063, forks 119 (observed 2026-08-28T04:06:09.931778+00:00)

## What it is
Dacite is a lightweight Python library that simplifies creating data class instances from dictionaries, with support for nested structures, optionals, unions, generics, and custom type hooks. It focuses purely on deserialization into typed data classes, not data validation.

## Use cases
- convert a dictionary into a typed dataclass instance
- deserialize HTTP request payloads into data transfer objects
- map raw database rows to data classes
- build nested dataclass structures from JSON-like dicts
- create type-hinted DTOs from untyped dict data

## When to choose
- you use Python dataclasses and need to instantiate them from dictionaries
- you want lightweight deserialization without heavyweight validation schemas
- you need support for nested structures, unions, and generics in dict-to-dataclass conversion

## When to avoid
- you need full input validation - use pydantic or marshmallow instead
- you need serialization back to dictionaries or JSON
- you are not using Python 3.7+ or dataclasses

## Facets
- artifact type: library
- maturity: stable
- function: serialization, parser
- domain: developer-tools, backend
- platform: python, cross-platform
- tags: dataclasses, dto, type-hints, deserialization, from-dict, data-engineering

## Member repositories
- konradhalas/dacite (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:09.931778+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:57:10.171314+00:00, confidence not recorded.
  - readme: https://github.com/konradhalas/dacite (fetched 2026-08-28T04:06:09.931778+00:00, sha d45be3995b49)
  - registry_pypi: https://pypi.org/pypi/dacite/json (fetched 2026-08-29T10:37:27.270195+00:00, sha 38c41c4ea93b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
