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.
| System | Port | Version | Vulnerabilities | Status | Maintainer | Last update |
|---|---|---|---|---|---|---|
| MidnightBSD | devel/py-cattrs | 23.2.3_1 behind since 2026-09-07 | no data | - | [email protected] | - |
| FreeBSD | devel/py-cattrs | 26.2.0 behind since 2026-09-28 | none known | - | [email protected] | 2026-09-12 |
| OpenBSD | devel/py-cattrs | 26.2.1 newest | no data | - | The OpenBSD ports mailing-list <[email protected]> | 2026-10-16 |
| NetBSD | devel/py-cattrs | 26.2.0 behind since 2026-09-28 | none known | - | [email protected] | 2026-10-16 |
| DragonFly | devel/py-cattrs | 24.1.2 behind since 2026-09-07 | none known | - | [email protected] | - |
| HardenedBSD | devel/py-cattrs | 26.2.0 behind since 2026-09-28 | no data | - | [email protected] | - |
| GhostBSD | devel/py-cattrs | 26.2.0 behind since 2026-09-28 | no data | - | [email protected] | - |
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
${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0: devel/py-hatch-vcs${PYTHON_PKGNAMEPREFIX}hatchling>=0: devel/py-hatchling
Runtime 1
${PYTHON_PKGNAMEPREFIX}attrs>=23.1.0: devel/py-attrs
Build dependencies 2
Run dependencies 1
Required by 1
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| cattrs-23.2.3.tar.gz | 610215 | a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f |
Master sites 1
- PYPI