Metadata-Version: 2.5
Name: xiaojing
Version: 0.0.3
Summary: 长度、质量与温度的单位换算。
Project-URL: Homepage, https://pypi.org/project/xiaojing/
Author-email: lqxnjk <lqxnjk@qq.com>
License: MIT
License-File: LICENSE
Keywords: convert,length,mass,temperature,unit
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# xiaojing

[English](#english) | 中文

长度、质量与温度的单位换算。

## 安装

```console
pip install xiaojing
```

## 用法

```python
from xiaojing import convert

convert(1, "km", "m")        # 1000.0
convert(1, "mile", "km")     # 1.609344
convert(1, "kg", "lb")       # 2.204622...
convert(100, "c", "f")       # 212.0
```

## 说明

长度与质量走「先归一到基准单位再换算」，所以任意两个受支持单位之间都能互转；温度单独处理，因为它不是线性缩放而是带偏移。未知单位抛 `KeyError`，不做模糊匹配。

## 许可证

MIT

---

<a id="english"></a>
## English

Convert units of length, mass and temperature.

## Install

```console
pip install xiaojing
```

## Usage

```python
from xiaojing import convert

convert(1, "km", "m")        # 1000.0
convert(1, "mile", "km")     # 1.609344
convert(1, "kg", "lb")       # 2.204622...
convert(100, "c", "f")       # 212.0
```

## Notes

Length and mass convert through a base unit, so any supported pair works. Temperature is handled separately because it carries an offset, not just a scale. An unknown unit raises `KeyError` rather than being guessed.

## License

MIT
