BSD Ports

devel/py-cattrs 23.2.3_1 MidnightBSD

Composable complex class support for attrs and dataclasses

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
mit
Categories
devel, python

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 26.2.1, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
MidnightBSDdevel/py-cattrs23.2.3_1 behind since 2026-09-07no data-[email protected]-
FreeBSDdevel/py-cattrs26.2.0 behind since 2026-09-28none known-[email protected]2026-09-12
OpenBSDdevel/py-cattrs26.2.1 newestno data-The OpenBSD ports mailing-list <[email protected]>2026-10-16
NetBSDdevel/py-cattrs26.2.0 behind since 2026-09-28none known-[email protected]2026-10-16
DragonFlydevel/py-cattrs24.1.2 behind since 2026-09-07none known-[email protected]-
HardenedBSDdevel/py-cattrs26.2.0 behind since 2026-09-28no data-[email protected]-
GhostBSDdevel/py-cattrs26.2.0 behind since 2026-09-28no data-[email protected]-

Compare across BSDs

Install

Binary package:

mport install ${PYTHON_PKGNAMEPREFIX}cattrs

From mports:

cd /usr/mports/devel/py-cattrs && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cattrs>0:devel/py-cattrs

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

As this port's Makefile names them.

Build 2

Runtime 1

Build dependencies 2
Run dependencies 1
Required by 1

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
cattrs-23.2.3.tar.gz610215a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f
Master sites 1
  • PYPI