semvec/pypi-packages huggingface dataset:
qiyas 0.2.3
qiyas - A lightweight non-opinionated customizable unit conversion Python library
Requires Python: >=3.7

# qias

[![Upload Python Package](https://github.com/MosGeo/qiyas/actions/workflows/python-publish.yml/badge.svg)](https://github.com/MosGeo/qiyas/actions/workflows/python-publish.yml)


qias is lightweight easy-to-use non-opinionated unit conversion Python library for scientists and engineers. It is based on graph theory and allows easy customization and addition of new units via script. Each unit need to be only defined by one existing unit. qias is smart enough to figure out the rest.

## Important note
This is a very early release to proove the concept. Everything is working as expected and there are no issues. conversion tables need to be added. Currently, there are some units for length, mass, and volume for testing.

## Philosophy
- Lightweight: it only relies on the `networkx` package to handle graph operations and `varname` to identify variable names.
- Easy-to-use: customize it easily with new units.
- non-opinionated: It does not assume anything about your data. It does not create new data type. You can pass numpy array (or datatype that can be multiplied by a number) to it without issue.

## Installation
Install it in your environment by running the command

```
pip install qiyas
```

## Getting started

```python
from qiyas import qs

# Typical use
x = 10
x_cm = qs.convert(x, 'm', 'cm')

# Immediate use (Python 3.8+)
x_m = 10
x_cm = qs.to(x_m, 'cm')

# Get multiplier information
multiplier_info = qs.get_multiplier('m', 'cm')
```

## Contribution
Contributions are welcome, especially for unit tables. Create an issue first to discuss architectural change.


MIT License

Copyright (c) 2021 Mustafa Al Ibrahim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.