Pinttrs
Pint meets attrs
Motivation
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.
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 for more detail.
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.
Metadata
Release files for pinttrs 26.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pinttrs-26.1.0.tar.gz | 150.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pinttrs-26.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.5 kB
Release files / pinttrs-26.1.0.tar.gz
| Download URL | pinttrs-26.1.0.tar.gz |
|---|---|
| Size | 150.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77d7bfecd7d56efe869789c03b638031bcf40f02752f0f207582fdd8290c4e0a
|
|
BLAKE2b-256 checksum How to use checksums |
5f1c87c8edd78ab0d49182ac5508b711b64bddfcecc3345a857258f39928a7db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pinttrs-26.1.0-py3-none-any.whl
| Download URL | pinttrs-26.1.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e0179c5643b49bc11d3433203c364216ad21a328051021052a8a6a20dd1f44a
|
|
BLAKE2b-256 checksum How to use checksums |
c77a118535678c3d459d7628a2ea7515ae8321e5a9bff5dd75b2454a33cd1e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pinttrs 26.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.