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 2 of 11

0.30.0

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

**Features and Improvements**

- **Conditional Field Skipping**: Omit fields during JSON serialization based on user-defined conditions.
- Introduced new :class:`Meta` settings:
- :attr:`skip_if` — Skips all fields matching a condition.
- :attr:`skip_defaults_if` — Skips fields with default values matching a condition.
- Added per-field controls using :func:`SkipIf()` annotations.
- Introduced the :func:`skip_if_field` wrapper for maximum flexibility.

- **New Helper Class**: :class:`JSONPyWizard`
- A ``JSONWizard`` helper to disable *camelCase* transformation and keep keys as-is.

- **Typing Improvements**: Added more ``*.pyi`` files for enhanced type checking and IDE support.

- **Documentation Updates**:
- Added details about upcoming changes in the next major release, ``v1.0``.

0.29.3

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

**Bugfixes**

* Fixed compatibility between `Global Meta Settings`_ and :attr:`recursive_classes` (:issue:`142`).

.. _Global Meta Settings: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/meta.html#global-meta-settings

0.29.2

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

**Bugfixes**

* Fixed issue with using :attr:`Meta.auto_assign_tags` and :attr:`Meta.raise_on_unknown_json_key` together (:issue:`137`).
* Fixed :attr:`JSONWizard.debug` to prevent overwriting existing class meta.
* Resolved issue where both :attr:`auto_assign_tags` and :type:`CatchAll` resulted in the tag key being incorrectly saved in :type:`CatchAll`.
* Fixed issue when :type:`CatchAll` field was specified with a default value but serialized with :attr:`skip_defaults=False`.
* Improved performance in :class:`UnionParser`: ensured that :func:`get_parser` is called only once per annotated type.
* Added test case(s) to confirm intended behavior.

0.29.1

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

**Bugfixes**

* Include ``*.pyi`` files in source distribution (packaging).

0.29.0

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

**Features and Improvements**

- *Nested JSON Mapping* (:issue:`60`): Map nested JSON keys to dataclass fields using helper functions :func:`KeyPath` or :func:`json_field`.
- *Catch-All Keys* (:issue:`57`): Save unknown JSON keys with ease.
- *Cleaner Codebase*: Remove comments and type annotations for Python files with ``.pyi`` counterparts.
- *Enhanced Debugging*: ``debug_enabled`` now supports ``bool | int | str``, allowing flexible logging levels.
- *Documentation Updates*: Improved and expanded docs!

0.28.0

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

**Features and Improvements**

* Added :class:`TOMLWizard`.
* Introduced new (pre-process) serializer hooks:
* :meth:`_pre_from_dict`
* :meth:`_pre_dict`
* Added ``debug`` parameter to :meth:`JSONWizard.__init_subclass__`.
* Added ``*.pyi`` stub files for better Type Hinting and Autocompletion in IDEs (e.g., PyCharm):
* :file:`abstractions.pyi`
* :file:`serial_json.pyi`
* Introduced utility class :class:`FunctionBuilder` to help build and dynamically ``exec`` a function.
* Documentation/tests on the new and updated features.

**Changes**

* The returned parser for a dataclass is now the original load/dump function itself (which takes a single argument)
rather than a :class:`Parser` instance.
* Minor optimization and quality-of-life improvement: dynamically ``exec`` dataclass load and dump functions.
* Improved performance: if a class defines a :meth:`from_dict` method - equivalent to :func:`fromdict` - and a :meth:`to_dict` method
- equivalent to :func:`asdict` - replace them with dynamically generated load/dump functions.
* Deprecated the pre-process hook :meth:`DumpMixin.__pre_as_dict__`.

Page 2 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.