Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
=======
`=======
History
=======


0.36.2 (2025-12-15)
------------------

**Documentation**

- Updated the documentation URL to ``https://dcw.ritviknag.com``.
- Simplified the docs landing page by removing the redundant title header.
- Refined the front-page layout for improved clarity and mobile readability.

**Notes**

- This release includes documentation and presentation updates only.
- No functional or behavioral changes were introduced.

0.36.1 (2025-12-15)
------------------

Expand Down Expand Up @@ -265,7 +279,7 @@ Happy Thanksgiving 🦃, y'all! In this release, Dataclass Wizard introduces the

* 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
.. _Global Meta Settings: https://dcw.ritviknag.com/en/latest/common_use_cases/meta.html#global-meta-settings

0.29.2 (2024-11-24)
-------------------
Expand Down Expand Up @@ -593,7 +607,7 @@ Happy Thanksgiving 🦃, y'all! In this release, Dataclass Wizard introduces the
* Update the docs and readme with examples and usage of *future
annotations* in Python 3.7+.

.. _new-style annotations: https://dataclass-wizard.readthedocs.io/en/latest/python_compatibility.html#python-3-7
.. _new-style annotations: https://dcw.ritviknag.com/en/latest/python_compatibility.html#python-3-7
.. _PEP 585: https://www.python.org/dev/peps/pep-0585/
.. _PEP 604: https://www.python.org/dev/peps/pep-0604/

Expand Down
67 changes: 31 additions & 36 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
================
Dataclass Wizard
================

.. image:: https://raw.githubusercontent.com/rnag/dataclass-wizard/main/images/logo.png
:alt: Dataclass Wizard logo
Expand All @@ -9,7 +6,7 @@ Dataclass Wizard

**Simple, elegant wizarding tools for Python’s** ``dataclasses``.

📘 Docs → `dataclass-wizard.ritviknag.com`_
📘 Docs → `dcw.ritviknag.com`_

.. image:: https://github.com/rnag/dataclass-wizard/actions/workflows/dev.yml/badge.svg
:target: https://github.com/rnag/dataclass-wizard/actions/workflows/dev.yml
Expand All @@ -27,9 +24,7 @@ Dataclass Wizard
:target: https://pepy.tech/project/dataclass-wizard
:alt: Downloads per Month

Lightning-fast ⚡, pure Python, and lightweight — Dataclass Wizard makes it easy
to convert dataclass instances to and from JSON, with built-in support for
complex dataclass models.
**Dataclass Wizard** is a fast, well-tested serialization library for Python dataclasses.

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

Expand Down Expand Up @@ -161,7 +156,7 @@ of *Dataclass Wizard* for unsupported Python versions (3.6 – 3.8):
.. _PyPI: https://pypi.org/project/dataclass-wizard/
.. _conda: https://anaconda.org/conda-forge/dataclass-wizard
.. _conda-forge: https://conda-forge.org/
.. _Changelog: https://dataclass-wizard.ritviknag.com/en/latest/history.html
.. _Changelog: https://dcw.ritviknag.com/en/latest/history.html

See the package on `PyPI`_ and the `Changelog`_ in the docs for the latest version details.

Expand Down Expand Up @@ -377,7 +372,7 @@ debugging purposes. Whenever you invoke ``print(obj)`` or ``str(obj)``, for
example, it'll call this method which will format the dataclass object as
a prettified JSON string. If you prefer a ``__str__`` method to not be
added, you can pass in ``str=False`` when extending from the Mixin class
as mentioned `here <https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/skip_the_str.html>`_.
as mentioned `here <https://dcw.ritviknag.com/en/latest/common_use_cases/skip_the_str.html>`_.

Note that the ``__repr__`` method, which is implemented by the
``dataclass`` decorator, is also available. To invoke the Python object
Expand Down Expand Up @@ -1277,7 +1272,7 @@ Quick Examples

Combine these helpers for flexible serialization rules!

.. _conditional skipping: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/serialization_options.html#skip-if-functionality
.. _conditional skipping: https://dcw.ritviknag.com/en/latest/common_use_cases/serialization_options.html#skip-if-functionality

Serialization Options
---------------------
Expand Down Expand Up @@ -1426,7 +1421,7 @@ Easily map environment variables to Python dataclasses with ``EnvWizard``:
- **Configurable**: Customize variable names, prefixes, and dotenv files.
- **Validation**: Errors for missing or malformed variables.

📖 `Full Documentation <https://dataclass-wizard.ritviknag.com/en/latest/env_magic.html>`_
📖 `Full Documentation <https://dcw.ritviknag.com/en/latest/env_magic.html>`_

Advanced Example: Dynamic Prefix Handling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1592,42 +1587,42 @@ Credits

This package was created with Cookiecutter_ and the `rnag/cookiecutter-pypackage`_ project template.

.. _dataclass-wizard.ritviknag.com: https://dataclass-wizard.ritviknag.com
.. _dcw.ritviknag.com: https://dcw.ritviknag.com
.. _Cookiecutter: https://github.com/cookiecutter/cookiecutter
.. _`rnag/cookiecutter-pypackage`: https://github.com/rnag/cookiecutter-pypackage
.. _`Contributing`: https://dataclass-wizard.ritviknag.com/en/latest/contributing.html
.. _`Contributing`: https://dcw.ritviknag.com/en/latest/contributing.html
.. _`open an issue`: https://github.com/rnag/dataclass-wizard/issues
.. _`JSONPyWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonpywizard
.. _`EnvWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#envwizard
.. _`on EnvWizard`: https://dataclass-wizard.ritviknag.com/en/latest/env_magic.html
.. _`JSONListWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonlistwizard
.. _`JSONFileWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonfilewizard
.. _`TOMLWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#tomlwizard
.. _`YAMLWizard`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#yamlwizard
.. _`Container`: https://dataclass-wizard.ritviknag.com/en/latest/dataclass_wizard.html#dataclass_wizard.Container
.. _`Supported Types`: https://dataclass-wizard.ritviknag.com/en/latest/overview.html#supported-types
.. _`JSONPyWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonpywizard
.. _`EnvWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#envwizard
.. _`on EnvWizard`: https://dcw.ritviknag.com/en/latest/env_magic.html
.. _`JSONListWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonlistwizard
.. _`JSONFileWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#jsonfilewizard
.. _`TOMLWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#tomlwizard
.. _`YAMLWizard`: https://dcw.ritviknag.com/en/latest/common_use_cases/wizard_mixins.html#yamlwizard
.. _`Container`: https://dcw.ritviknag.com/en/latest/dataclass_wizard.html#dataclass_wizard.Container
.. _`Supported Types`: https://dcw.ritviknag.com/en/latest/overview.html#supported-types
.. _`Mixin`: https://stackoverflow.com/a/547714/10237506
.. _`Meta`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/meta.html
.. _`Meta`: https://dcw.ritviknag.com/en/latest/common_use_cases/meta.html
.. _`pydantic`: https://pydantic-docs.helpmanual.io/
.. _`Using Field Properties`: https://dataclass-wizard.ritviknag.com/en/latest/using_field_properties.html
.. _`field properties`: https://dataclass-wizard.ritviknag.com/en/latest/using_field_properties.html
.. _`custom mapping`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/custom_key_mappings.html
.. _`wiz-cli`: https://dataclass-wizard.ritviknag.com/en/latest/wiz_cli.html
.. _`Using Field Properties`: https://dcw.ritviknag.com/en/latest/using_field_properties.html
.. _`field properties`: https://dcw.ritviknag.com/en/latest/using_field_properties.html
.. _`custom mapping`: https://dcw.ritviknag.com/en/latest/common_use_cases/custom_key_mappings.html
.. _`wiz-cli`: https://dcw.ritviknag.com/en/latest/wiz_cli.html
.. _`key limitations`: https://florimond.dev/en/posts/2018/10/reconciling-dataclasses-and-properties-in-python/
.. _`more complete example`: https://dataclass-wizard.ritviknag.com/en/latest/examples.html#a-more-complete-example
.. _`more complete example`: https://dcw.ritviknag.com/en/latest/examples.html#a-more-complete-example
.. _custom formats: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
.. _`Patterned Date and Time`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/patterned_date_time.html
.. _`Patterned Date and Time`: https://dcw.ritviknag.com/en/latest/common_use_cases/patterned_date_time.html
.. _Union: https://docs.python.org/3/library/typing.html#typing.Union
.. _`Dataclasses in Union Types`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/dataclasses_in_union_types.html
.. _`Cyclic or "Recursive" Dataclasses`: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/cyclic_or_recursive_dataclasses.html
.. _`Dataclasses in Union Types`: https://dcw.ritviknag.com/en/latest/common_use_cases/dataclasses_in_union_types.html
.. _`Cyclic or "Recursive" Dataclasses`: https://dcw.ritviknag.com/en/latest/common_use_cases/cyclic_or_recursive_dataclasses.html
.. _as milestones: https://github.com/rnag/dataclass-wizard/milestones
.. _longstanding issue: https://github.com/rnag/dataclass-wizard/issues/62
.. _Easier Debug Mode: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/easier_debug_mode.html
.. _Handling Unknown JSON Keys: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/handling_unknown_json_keys.html
.. _custom paths to access nested keys: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/nested_key_paths.html
.. _Easier Debug Mode: https://dcw.ritviknag.com/en/latest/common_use_cases/easier_debug_mode.html
.. _Handling Unknown JSON Keys: https://dcw.ritviknag.com/en/latest/common_use_cases/handling_unknown_json_keys.html
.. _custom paths to access nested keys: https://dcw.ritviknag.com/en/latest/common_use_cases/nested_key_paths.html
.. _annotations: https://docs.python.org/3/library/typing.html#typing.Annotated
.. _typing: https://docs.python.org/3/library/typing.html
.. _dataclasses: https://docs.python.org/3/library/dataclasses.html
.. _V1 Opt-in documentation for Patterned Date and Time: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/v1_patterned_date_time.html
.. _V1 Opt-in documentation for Patterned Date and Time: https://dcw.ritviknag.com/en/latest/common_use_cases/v1_patterned_date_time.html
.. _`Field Guide to V1 Opt-in`: https://github.com/rnag/dataclass-wizard/wiki/Field-Guide-to-V1-Opt%E2%80%90in
.. _V1 Alias: https://dataclass-wizard.ritviknag.com/en/latest/common_use_cases/v1_alias.html
.. _V1 Alias: https://dcw.ritviknag.com/en/latest/common_use_cases/v1_alias.html
2 changes: 1 addition & 1 deletion dataclass_wizard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
>>> # {"myStr": "string", "listOfInt": [], "myDt": "2010-12-10T15:55:30Z"}

For full documentation and more advanced usage, please see
<https://dataclass-wizard.readthedocs.io>.
<https://dcw.ritviknag.com>.

:copyright: (c) 2021-2025 by Ritvik Nag.
:license: Apache 2.0, see LICENSE for more details.
Expand Down
6 changes: 3 additions & 3 deletions dataclass_wizard/bases_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def LoadMeta(**kwargs) -> META:
>>> LoadMeta(key_transform='CAMEL').bind_to(MyClass)
>>> fromdict(MyClass, {"myStr": "value"})

.. _Docs: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/meta.html
.. _Docs: https://dcw.ritviknag.com/en/latest/common_use_cases/meta.html
"""
base_dict = kwargs | {'__slots__': ()}

Expand Down Expand Up @@ -357,7 +357,7 @@ def DumpMeta(**kwargs) -> META:
>>> DumpMeta(key_transform='CAMEL').bind_to(MyClass)
>>> asdict(MyClass, {"myStr": "value"})

.. _Docs: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/meta.html
.. _Docs: https://dcw.ritviknag.com/en/latest/common_use_cases/meta.html
"""

# Set meta attributes here.
Expand Down Expand Up @@ -390,7 +390,7 @@ def EnvMeta(**kwargs) -> META:

>>> EnvMeta(key_transform_with_dump='SNAKE').bind_to(MyClass)

.. _Docs: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/meta.html
.. _Docs: https://dcw.ritviknag.com/en/latest/common_use_cases/meta.html
"""

# Set meta attributes here.
Expand Down
2 changes: 1 addition & 1 deletion dataclass_wizard/property_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def property_wizard(*args, **kwargs):
the docs. I also added `an answer`_ on a SO article that deals with using
such properties in dataclasses.

.. _Using Field Properties: https://dataclass-wizard.readthedocs.io/en/latest/using_field_properties.html
.. _Using Field Properties: https://dcw.ritviknag.com/en/latest/using_field_properties.html
.. _an answer: https://stackoverflow.com/a/68488125/10237506
"""
cls: Type = type(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion dataclass_wizard/v1/dumpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def dump_from_union(cls, tp: TypeInfo, extras: Extras):
# ' * `v1_unsafe_parse_dataclass_in_union = True`\n'
# f' - Set on class `{extras["cls_name"]}`\n\n'
# 'For more information, refer to:\n'
# ' https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/dataclasses_in_union_types.html')
# ' https://dcw.ritviknag.com/en/latest/common_use_cases/dataclasses_in_union_types.html')
# raise e from None

string = cls.get_string_for_annotation(tp_new, extras)
Expand Down
2 changes: 1 addition & 1 deletion dataclass_wizard/v1/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class KeyAction(Enum):
- `WARN`: Log a warning for each unknown key.

For capturing unknown keys (e.g., including them in a dataclass), use the `CatchAll` field.
More details: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/handling_unknown_json_keys.html#capturing-unknown-keys-with-catchall
More details: https://dcw.ritviknag.com/en/latest/common_use_cases/handling_unknown_json_keys.html#capturing-unknown-keys-with-catchall
"""
IGNORE = 0 # Silently skip unknown keys.
RAISE = 1 # Raise an exception for the first unknown key.
Expand Down
2 changes: 1 addition & 1 deletion dataclass_wizard/v1/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def load_to_union(cls, tp: TypeInfo, extras: Extras):
' * `v1_unsafe_parse_dataclass_in_union = True`\n'
f' - Set on class `{extras["cls_name"]}`\n\n'
'For more information, refer to:\n'
' https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/dataclasses_in_union_types.html')
' https://dcw.ritviknag.com/en/latest/common_use_cases/dataclasses_in_union_types.html')
raise e from None

string = cls.get_string_for_annotation(tp_new, extras)
Expand Down
2 changes: 1 addition & 1 deletion docs/common_use_cases/custom_key_mappings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Map a JSON Key to a Field
This change is part of the ongoing improvements in version ``v0.35.0+``, and the old functionality will no longer be maintained in future releases.

.. _Field Guide to V1 Opt‐in: https://github.com/rnag/dataclass-wizard/wiki/Field-Guide-to-V1-Opt%E2%80%90in
.. _V1 Alias: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/v1_alias.html
.. _V1 Alias: https://dcw.ritviknag.com/en/latest/common_use_cases/v1_alias.html

The ``dataclass-wizard`` library provides a set of built-in *key transform* helper
functions that automatically transform the casing of keys in a JSON or Python
Expand Down
2 changes: 1 addition & 1 deletion docs/common_use_cases/nested_key_paths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Map a Nested JSON Key Path to a Field
This change is part of the ongoing improvements in version ``v0.35.0+``, and the old functionality will no longer be maintained in future releases.

.. _Field Guide to V1 Opt‐in: https://github.com/rnag/dataclass-wizard/wiki/Field-Guide-to-V1-Opt%E2%80%90in
.. _V1 Alias: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/v1_alias.html
.. _V1 Alias: https://dcw.ritviknag.com/en/latest/common_use_cases/v1_alias.html

The ``dataclass-wizard`` library allows mapping deeply nested JSON paths to individual dataclass fields using a custom object path notation. This feature supports both :type:`Annotated` types and :class:`dataclasses.Field` for flexible and precise JSON deserialization.

Expand Down
2 changes: 1 addition & 1 deletion docs/common_use_cases/patterned_date_time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Patterned Date and Time
This change is part of the ongoing improvements in version ``v0.35.0+``, and the old functionality will no longer be maintained in future releases.

.. _Field Guide to V1 Opt‐in: https://github.com/rnag/dataclass-wizard/wiki/Field-Guide-to-V1-Opt%E2%80%90in
.. _V1 Patterned Date and Time: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/v1_patterned_date_time.html
.. _V1 Patterned Date and Time: https://dcw.ritviknag.com/en/latest/common_use_cases/v1_patterned_date_time.html

Loading an `ISO 8601`_ format string into a :class:`date` / :class:`time` /
:class:`datetime` object is already handled as part of the de-serialization
Expand Down
2 changes: 1 addition & 1 deletion docs/common_use_cases/wizard_mixins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ string-to-type conversion. Requires subclass instantiation to function.

For a detailed example and advanced features:

- 📖 `Full Documentation <https://dataclass-wizard.readthedocs.io/en/latest/env_magic.html>`_
- 📖 `Full Documentation <https://dcw.ritviknag.com/en/latest/env_magic.html>`_

:class:`JSONPyWizard`
~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Advantages
.. _fromisoformat(): https://docs.python.org/3/library/datetime.html#datetime.date.fromisoformat
.. _defaultdict: https://docs.python.org/3/library/collections.html#collections.defaultdict
.. _jsons: https://pypi.org/project/jsons/
.. _`wiz-cli`: https://dataclass-wizard.readthedocs.io/en/latest/wiz_cli.html
.. _`wiz-cli`: https://dcw.ritviknag.com/en/latest/wiz_cli.html
.. _dataclasses-json: https://pypi.org/project/dataclasses-json/

Supported Types
Expand Down Expand Up @@ -221,5 +221,5 @@ Special Cases
from JSON objects using the annotated base type, and serialized back as
plain ``dict`` objects.

.. _using dataclasses: https://dataclass-wizard.readthedocs.io/en/latest/common_use_cases/dataclasses_in_union_types.html
.. _using dataclasses: https://dcw.ritviknag.com/en/latest/common_use_cases/dataclasses_in_union_types.html
.. _pytimeparse: https://pypi.org/project/pytimeparse/
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
install_requires=requires,
project_urls={
'Discussions': 'https://github.com/rnag/dataclass-wizard/discussions',
'Changelog': 'https://dataclass-wizard.ritviknag.com/en/latest/history.html',
'Changelog': 'https://dcw.ritviknag.com/en/latest/history.html',
'Source': 'https://github.com/rnag/dataclass-wizard',
'Download': 'https://pypi.org/project/dataclass-wizard',
'Documentation': 'https://dataclass-wizard.ritviknag.com',
'Documentation': 'https://dcw.ritviknag.com',
'Bug Tracker': 'https://github.com/rnag/dataclass-wizard/issues',
},
license=about['__license__'],
Expand Down