Metadata-Version: 2.1
Name: desert
Version: 2020.1.3
Summary: Deserialize to objects while staying DRY
Home-page: https://github.com/python-desert/desert
Author: Desert contributors
Author-email: python-desert@users.noreply.github.com
License: UNKNOWN
Description: ===============================
        Desert: DRY deserialization
        ===============================
        
        
        
        
        Desert generates serialization schemas for ``dataclasses`` and ``attrs`` classes. Writing
        code that's DRY ("don't repeat yourself") helps avoid bugs and improve readability. Desert
        helps you write code that's DRY.
        
        
        
        
        
        
        
        Installation
        ============
        
        ::
        
            pip install desert
        
        or with `Poetry`_
        
        ::
        
           poetry add desert
        
        
        Usage
        =========
        
        ..
            start-basic-usage
        
        A simple example models two ``Person`` objects in a ``Car``.
        
        .. code-block:: python
        
        
        
                from dataclasses import dataclass
        
                # Or using attrs
                # from attr import dataclass
        
                from typing import List
        
        	import desert
        
                @dataclass
                class Person:
                    name: str
                    age: int
        
                @dataclass
                class Car:
                    passengers: List[Person]
        
                # Load some simple data types.
                data = {'passengers': [{'name': 'Alice', 'age': 21}, {'name': 'Bob', 'age': 22}]}
        
        
                # Create a schema for the Car class.
                schema = desert.schema(Car)
        
                # Load the data.
                car = schema.load(data)
                assert car == Car(passengers=[Person(name='Alice', age=21), Person(name='Bob', age=22)])
        
        
        ..
            end-basic-usage
        
        Documentation
        =============
        
        
        https://desert.readthedocs.io/
        
        
        Limitations
        ============
        
        String annotations and forward references inside of functions are not supported.
        
        
        
        
        
        Acknowledgements
        =================
        
        - This package began as an extension of marshmallow-dataclass_ to add support for attrs_.
        
        
        .. _Poetry: https://poetry.eustace.io
        .. _marshmallow-dataclass: https://pypi.org/project/marshmallow-dataclass/
        .. _attrs: http://www.attrs.org/
        
        2020.01.03
        --------------
        
        Changes
        ^^^^^^^^
        
        - ``Optional`` fields allow ``None``. `#11 <https://github.com/python-desert/desert/issues/11>`__. Thanks to @sveinse for reporting and testing.
        
        2019.12.18
        --------------
        
        Changes
        ^^^^^^^
        
        - Improve error message for unknown generics.
          `#10 <https://github.com/python-desert/desert/pull/10>`_
        
        2019.12.10
        --------------
        
        Changes
        ^^^^^^^
        
        - Add ``UnknownType`` exception with better error message for types that should be generic.
          `#8  <https://github.com/python-desert/desert/issues/8>`_
        
        
        
        2019.12.09
        --------------
        
        Changes
        ^^^^^^^
        
        - Marshmallow schema ``Meta`` arguments are accepted, allowing exclusion of unknown fields and other options.
          `#3  <https://github.com/python-desert/desert/pull/3>`_
        
        2019.11.06 (2019-11-06)
        -----------------------
        
        
        Changes
        ^^^^^^^
        
        - Add twine and wheel development dependencies.
          `#2 <https://github.com/python-desert/desert/issues/2>`_
        
        
        ----
        
        
        2019.11.06 (2019-11-06)
        -----------------------
        
        Changes
        ^^^^^^^
        
        - Switch to calver
        
        
        Backward-incompatible Changes
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
        - Non-optional fields without a default or factory now have `required=True` so raise ``marshmallow.exceptions.ValidationError`` when missing.
          `#1 <https://github.com/python-desert/desert/issues/1>`_
        
        
        ----
        
        0.1.0 (2019-06-22)
        ------------------
        
        Changes
        ^^^^^^^
        
        - First release on PyPI.
        
        ---
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Provides-Extra: dev
