Dataclass-wizard

Latest version: v0.34.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 11

0.23.0

-------------------

* :pr:`94`: Allows the ability to define keys in JSON/dataclass
that do not undergo transformation -- credits to :user:`cquick01`.

* ``LetterCase.NONE`` - Performs no conversion on strings.

* ex: `MY_FIELD_NAME` -> `MY_FIELD_NAME`

0.22.3

-------------------

**Features and Improvements**

* Add full support for Python 3.11 and 3.12 (Credits to :user:`alexanderilyin` on :pr:`101`)
* Project-specific development changes
* Update CI to run tests on PY 3.11 and 3.12
* Update ``wheel`` version
* Update ``setup.py`` to add a ``dev`` extra which installs dev-related dependencies
* Move test dependencies into ``requirements-test.txt``
* Add ``sphinx_issues`` dependency to easily add link in docs to an user/issue/PR on GitHub
* Update ``project_urls`` on PyPI to add extra links, such as "Changelog" and "Issue Tracker"


**Bugfixes**

* Fix: Loading a Variadic Tuple fails for length 0 (Credits to :user:`intentionally-left-nil` on :pr:`105`)
* Stop-gap fix for time-string patterns that contain ``-`` or ``+``,
as Python 3.11+ can interpret this as timezone data.

0.22.2

-------------------

**Features and Improvements**

* Minor performance improvement when dumping custom sub-types
or unhandled types, such that we cache the dump hook
for the type so that subsequent lookups are faster overall.

0.22.1

-------------------

**Features and Improvements**

* Update :class:`MissingFields` to provide a more user-friendly error message,
in cases where a missing dataclass field is not snake-cased, but could - with
the right *key transform* - map to a key in the JSON object. For example, a JSON key of ``myField`` and a field
named ``MyField``.

**Bugfixes**

* Fixed a bug in the load (or de-serialization) process with ``from_dict``, where a :class:`MissingFields` was raised
in cases where a dataclass field is not snake-cased, but is otherwise identical to a key in the JSON object.
For example, a JSON key and field |both named viewMode|_. The JSON data in such cases should now be correctly
de-serialized to a dataclass instance as expected.

.. _both named viewMode: https://github.com/rnag/dataclass-wizard/issues/54
.. |both named viewMode| replace:: both named ``viewMode``

0.22.0

-------------------

**Features and Improvements**

* Ensure that the :attr:`debug_enabled` flag now applies recursively to all
nested dataclasses, which is more helpful for debugging purposes.

* Add new attribute :attr:`json_object` -- which contains the original JSON
object -- to :class:`ParseError` objects, and include it in the object representation.

**Bugfixes**

* Fixed an issue with the :attr:`debug_enabled` flag enabled, where some load
hooks were not properly decorated when *debug* mode was enabled; errors were not
properly formatted in these cases. To elaborate, this only affected load hooks
decorated with a ``_single_arg_alias``. In particular, this affected the
load hooks for a few annotated types, such as ``float`` and ``enum``.

0.21.0

-------------------

**Features and Improvements**

* Adds few extra Wizard Mixin classes that might prove incredibly convenient to use.

- :class:`JSONListWizard` - Extends :class:`JSONWizard` to return *Container* -- instead of *list* -- objects where possible.
- :class:`JSONFileWizard` - Makes it easier to convert dataclass instances from/to JSON files on a local drive.
- :class:`YAMLWizard` - Provides support to convert dataclass instances to/from YAML, using the default PyYAML parser.

* Add a new :class:`Container` model class, a *list* sub-type which acts as a convenience wrapper around a collection of dataclass instances.

* The ``dataclass-wizard`` library now supports parsing of YAML data. It adds the `PyYAML`_ as an optional dependency, which is loaded when it's used for the initial time. This extra dependency can be installed via::

$ pip install dataclass-wizard[yaml]

.. _PyYAML: https://pypi.org/project/PyYAML/

Page 4 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.