Metadata-Version: 2.4
Name: pinttrs
Version: 25.1.0
Summary: Pint meets attrs.
Project-URL: Changelog, https://github.com/rayference/pinttrs/blob/main/CHANGELOG.md
Project-URL: Documentation, https://pinttrs.readthedocs.io
Project-URL: Homepage, https://github.com/rayference/pinttrs
Project-URL: Issues, https://github.com/rayference/pinttrs/issues
Project-URL: Repository, https://github.com/rayference/pinttrs
Author-email: Vincent Leroy <vincent.leroy@rayference.eu>
License: MIT
        
        Copyright (c) 2021 Vincent Leroy
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
License-File: LICENSE
Classifier: Development Status :: 6 - Mature
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Requires-Dist: attrs>=21.3
Requires-Dist: pint>=0.16
Description-Content-Type: text/markdown

# Pinttrs

*Pint meets attrs*

[![PyPI version](https://img.shields.io/pypi/v/pinttrs?color=blue)](https://pypi.org/project/pinttrs)
[![Conda version](https://img.shields.io/conda/v/conda-forge/pinttrs?color=blue)](https://anaconda.org/conda-forge/pinttrs)

[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/leroyvn/pinttrs/ci.yml?branch=main)](https://github.com/leroyvn/pinttrs/actions/workflows/ci.yml)
[![Documentation Status](https://img.shields.io/readthedocs/pinttrs)](https://pinttrs.readthedocs.io)

[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

## Motivation

The amazing [*attrs*](https://www.attrs.org) 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](https://pint.readthedocs.io).

## Features

- 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](https://pinttrs.readthedocs.io) for more detail.

## License

Pinttrs is distributed under the terms of the
[MIT license](https://choosealicense.com/licenses/mit/).

## About

Pinttrs is written and maintained by [Vincent Leroy](https://github.com/leroyvn).

Development is supported by [Rayference](https://www.rayference.eu).

Pinttrs is a component of the
[Eradiate radiative transfer model](https://www.eradiate.eu).

The Pinttrs logo is based on
[Agus Nugroho](https://www.iconfinder.com/nugrohoagus)'s glass icon and parts of
the *attrs* logo.
