skillfed

dacite

Simple creation of data classes from dictionaries.

dacite Permissive license MIT AGING 2,041 v1.9.2 released

Install

dacite on PyPI

pip

pip install dacite

uv

uv add dacite

poetry

poetry add dacite

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — dataclasses
Maintenance aging — 554 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: dacite-1.9.2-py3-none-any.whl

Keywords: dataclasses

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

About dacite

from the package's own PyPI description — quoted content, verbatim

https://user-images.githubusercontent.com/1078369/212840759-174c0f2b-d446-4c3a-b97c-67a0b912e7f6.png (image)

dacite

Build Status (image) Coverage Status (image) License (image) Version (image) Python versions (image) Code style: black (image)

This module simplifies creation of data classes ([PEP 557][pep-557]) from dictionaries.

Installation

To install dacite, simply use pip:

$ pip install dacite

Requirements

Minimum Python version supported by dacite is 3.7.

Quick start

```python from dataclasses import dataclass from dacite import from_dict

@dataclass class User: name: str age: int...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Dacite converts dictionaries into instances of Python dataclasses, handling nested structures, type checking, optional fields, unions, generics, and collections with minimal boilerplate.

Low friction: pure Python wheel with only the standard library's dataclasses as a runtime dependency. Last release was 554 days ago; the repository remains active with a recent commit on 2025-03-17, though the aging maintenance status suggests infrequent updates.

MIT license (permissive) places no restrictions on use, modification, or redistribution in proprietary or open-source projects.

Usage

pip install dacite==1.9.2

from dataclasses import dataclass
from dacite import from_dict

@dataclass
class User:
    name: str
    age: int

user = from_dict(User, {'name': 'John', 'age': 30})

Requires Python 3.7 or later; dataclasses module is built-in from Python 3.7 onward.

Verdict: Dacite is a stable, lightweight utility for converting dictionaries to typed dataclass instances. With zero known vulnerabilities, minimal dependencies, and broad Python version support (3.7–3.13), it is well-suited for projects needing simple dict-to-dataclass conversion without the overhead of a full validation framework. The aging maintenance status and 554-day gap since the last release suggest it is mature but not actively developed.

Needs verification

  • Whether the package is suitable for high-frequency deserialization or if performance characteristics matter for your use case.
  • Whether custom type hooks and casting features are sufficient for your specific data transformation needs.
dataclass from dictionarydict to dataclass conversionpydantic alternative lightweightserialize dict to typed objectdataclass deserializationpython dataclass factorytype-safe dict unpacking

Similar packages