Source: python-cattrs Section: python Maintainer: Sandro Tosi Build-Depends: debhelper-compat (= 13), pybuild-plugin-pyproject, python3-all, python3-attr , python3-bson , python3-cbor2 , python3-hatch-vcs, python3-hatchling, python3-hypothesis , python3-msgpack , python3-msgspec , python3-orjson , python3-pytest , python3-pytest-benchmark , python3-tomli-w , python3-tomlkit , python3-typing-extensions , python3-ujson , python3-yaml , Standards-Version: 4.7.4 Testsuite: autopkgtest-pkg-pybuild Homepage: https://github.com/python-attrs/cattrs Vcs-Git: https://salsa.debian.org/morph/python-cattrs.git Vcs-Browser: https://salsa.debian.org/morph/python-cattrs Package: python3-cattr Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, Recommends: ${python3:Recommends}, Suggests: ${python3:Suggests}, Description: flexible object serialization and validation for attrs and dataclasses cattrs is a Swiss Army knife for (un)structuring and validating data in Python. In practice, that means it converts unstructured dictionaries into proper classes and back, while validating their contents. . Python has a rich set of powerful, easy to use, built-in unstructured data types like dictionaries, lists and tuples. These data types effortlessly convert into common serialization formats like JSON, MessagePack, CBOR, YAML or TOML. But the data used by your business logic should be structured into well-defined classes, since not all combinations of field names or values are valid inputs to your programs. . When you're handed unstructured data (by your network, file system, database, ...), cattrs helps to convert this data into trustworthy structured data. When you have to convert your structured data into data types that other libraries can handle, cattrs turns your classes and enumerations into dictionaries, integers and strings. . cattrs works best with attrs classes and dataclasses, where simple (un-)structuring works out of the box, even for nested data, without polluting your data model with serialization details.