BSD Ports

devel/py-cattrs23 23.2.3 GhostBSD

Composable complex class support for attrs and dataclasses

System
GhostBSD
Repository
GhostBSD
Maintainer
[email protected] (as in FreeBSD)
License
MIT
Categories
devel, python
Package size
112.7 KiB, 630.6 KiB installed

Description

cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes, dataclasses and the usual Python collections, but other kinds of classes are supported by manually registering converters.

Python has a rich set of powerful, easy to use, built-in data types like dictionaries, lists and tuples. These data types are also the lingua franca of most data serialization libraries, for formats like json, msgpack, yaml or toml.

Data types like this, and mappings like dict s in particular, represent unstructured data. Your data is, in all likelihood, structured: not all combinations of field names or values are valid inputs to your programs. In Python, structured data is better represented with classes and enumerations. attrs is an excellent library for declaratively describing the structure of your data, and validating it.

When you're handed unstructured data (by your network, file system, database...), cattrs helps to convert this data into structured data. When you have to convert your structured data into data types other libraries can handle, cattrs turns your classes and enumerations into dictionaries, integers and strings.

In the other systems

The newest version among them is 23.2.3, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
GhostBSDdevel/py-cattrs2323.2.3 newestnone known-[email protected]-
DragonFlydevel/py-cattrs2323.2.3 newestnone known-[email protected]-

Install

Binary package:

pkg install py312-cattrs23

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Run dependencies 2

No port depends on this one.