https://github.com/lace/ounce
A simple Python package to manipulate units of measure
https://github.com/lace/ounce
conversion units units-of-measure
Last synced: 3 months ago
JSON representation
A simple Python package to manipulate units of measure
- Host: GitHub
- URL: https://github.com/lace/ounce
- Owner: lace
- License: bsd-2-clause
- Created: 2019-10-28T14:27:59.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T17:58:12.000Z (over 2 years ago)
- Last Synced: 2025-03-25T11:02:22.383Z (7 months ago)
- Topics: conversion, units, units-of-measure
- Language: Python
- Homepage: https://ounce.readthedocs.io/en/latest/
- Size: 180 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ounce
=====[][pypi]
[][pypi]
[][pypi]
[][coverage]
[][build]
[][docs build]
[][black]Fast, simple, non-fancy, and non-magical package for manipulating units of
measure.It's a faster and less fancy counterpart to [Pint][].
[pypi]: https://pypi.org/project/ounce/
[coverage]: https://github.com/lace/ounce/blob/master/.coveragerc
[build]: https://circleci.com/gh/lace/ounce/tree/master
[docs build]: https://ounce.readthedocs.io/en/latest/
[black]: https://black.readthedocs.io/en/stable/
[numpy]: https://www.numpy.org/
[pint]: https://pint.readthedocs.io/Installation
------------```sh
pip install ounce
```Usage
-----```py
import ouncevalue, units = ounce.convert(value, "in", "cm")
```Versioning
----------This library adheres to [Semantic Versioning][semver].
[semver]: https://semver.org/
Development
-----------First, [install Poetry][].
After cloning the repo, run `./bootstrap.zsh` to initialize a virtual
environment with the project's dependencies.Subsequently, run `./dev.py install` to update the dependencies.
[install poetry]: https://python-poetry.org/docs/#installation
Acknowledgements
----------------This was extracted from [blmath][] by [Paul Melnikow][]. blmath itself was
extracted from the Body Labs codebase and open-sourced by [Alex Weiss][].[blmath]: https://github.com/metabolize/blmath
[paul melnikow]: https://github.com/paulmelnikow
[alex weiss]: https://github.com/algrsLicense
-------The project is licensed under the two-clause BSD license.