Natural units in Python
Warning: This project is currently in a pre-release state. It will be officially released once the unit tests are complete.
natu is a free, open-source package to represent physical quantities. There are many Python packages that deal with units and quantities, but natu is uniquely system-independent. The units are derived from physical constants with adjustable values and dimensions. The value of a unit is factored into a quantity so that the quantity is not "in" any particular unit. This has the following advantages:
For example, you can do this:
>>> from natu.units import degC, K
>>> 0*degC + 100*K
100.0 degC
Please see the tutorial for more examples and visit the main website for the full documentation.
The easiest way is to install natu is to use pip:
> pip install natu
On Linux, it may be necessary to have root privileges:
$ sudo pip install natu
natu is published under a BSD-compatible license. Please
share any improvements you make, preferably as a pull request to the master
branch of the GitHub repository. There are useful development scripts in the
hooks folder. If you find a bug, have a suggestion, or just want to
leave a comment, please
open an issue.