Physical units as global variables for simple numerical propagation
Project description
physunits
Simple package with common physical unit definitions.
Installation
Usage
An example usage of this package is: ``>> from physunits import *
print(f"{1000 * cm / um:.2f} is how many microns there are in a thousand centimeters") 10000000.00 is how many microns there are in a thousand centimeters ``
The package tries to include only the most used unit prefixes, but you can generate other units, for example: ``>> from physunits import *
minute = 60 * s hour = 60 * minute day = 24 * hour print(f'There are approximately {365*day / hour} hours in a year.') There are approximately 8760.0 hours in a year.
The unit prefixes act as globals. If only a set of units is desired, manually importing them as:
from physunits import mm, nm, um`` is sufficient.
Contact and support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for physunits-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0898afad6d61d961252feb958f3b915bf1ea2322b66923a1790a4926f08677 |
|
MD5 | c7cd7bd514eb066328e88a3accb72b87 |
|
BLAKE2b-256 | 7daa4db87cf66c8e3f986f7db7ec65a95aa264e52c509c22ba2362052ab9c39d |