Pinttrs#

Pinttrs v22.1.0.

https://img.shields.io/pypi/v/pinttrs?color=blue&style=flat-square https://img.shields.io/conda/v/eradiate/pinttrs?color=blue&style=flat-square https://img.shields.io/github/workflow/status/leroyvn/pinttrs/Tests/main?style=flat-square https://img.shields.io/readthedocs/pinttrs?style=flat-square https://img.shields.io/badge/code%20style-black-black?style=flat-square https://img.shields.io/badge/%20imports-isort-blue?style=flat-square&labelColor=orange

Pint meets attrs.

Pinttrs provides tools to bring extra functionality to your attrs classes using Pint.

Motivation#

The amazing attrs library is a game-changer when it comes to writing classes. Its initialisation sequence notably allows for automated conversion and verification of attribute values. This package is an attempt at designing a system to apply units automatically and reliably to attributes with Pint.

Features#

Getting started#

Install from PyPI in your virtual environment:

python -m pip install pinttrs

Using Conda:

conda install -c eradiate pinttrs -c conda-forge

The Usage section presents Pinttrs’s features and how to use them.

License#

Pinttrs is distributed under the terms of the MIT license.

About#

Pinttrs is written and maintained by Vincent Leroy.

Development is supported by Rayference.

Pinttrs is a component of the Eradiate radiative transfer model.

The Pinttrs logo is based on Agus Nugroho’s glass icon and parts of the attrs logo.