Skip to content

chrisguidry/measured

Repository files navigation

measured

measured is a library for measurements and quantities.

PyPi Build and test Code Coverage Documentation Status

>>> from measured import Speed
>>> from measured.si import Meter, Second
>>> distance = 10 * Meter
>>> time = 2 * Second
>>> speed = distance / time
>>> assert speed == 5 * Meter / Second
>>> assert speed.unit is Meter / Second
>>> assert speed.unit.dimension is Speed

The goal of measured is to provide a sound foundation for recording and converting physical quantities, while maintaining the integrity of their units and dimensions.

While it aims to be the fastest library of its kind, automatically tracking the units and dimensions of quantities introduces significant overhead. You can use measured for applications where the accuracy of the units is more important than raw numerical computing speed.

measured is licenced under the MIT Licence.

MIT License

Installing

measured is available on PyPi, and is tested with with Python and PyPy 3.8+:

$ pip install measured

Python Versions

Reference

The documentation for measured is on Read the Docs.

Contributing

Contributions are welcome! Please report bug and submit pull requests to https://github.com/chrisguidry/measured.

Issues Pull Requests