Pint meets attrs
The amazing attrs library is a game-changer when it comes to writing classes. Its initialization 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.
- Attach automatically units to unitless values passed to initialize an attribute
- Verify unit compatibility when assigning a value to an attribute
- Interpret units in dictionaries with a simple syntax
- Define unit context to vary unitless value interpretation dynamically
Check the documentation for more detail.
Pinttrs is distributed under the terms of the MIT license.
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.