aria-engine (Python)
aria-engine 是 Aria 推理引擎的 Python SDK(ctypes 封装 libaria_ffi)。
通过 PyPI 安装的 平台 wheel 内已捆绑动态库,开箱即用,无需手动设置环境变量。
安装(PyPI 发布版)
pip install aria-engine
支持 Linux (x86_64 / aarch64 manylinux)、macOS (x86_64 / arm64)、Windows (x86_64), Python 3.10+。wheel 内自带
libaria_ffi.so/.dylib/.dll。
用法
from aria_engine import Engine
with Engine("/path/to/bundle") as eng:
print(eng.complete([{"role":"user","content":"hi"}], {"max_tokens": 16}))
动态库查找顺序
_load_lib() 按以下顺序解析:
- 显式传入的
path - 环境变量
ARIA_FFI_LIB(源码安装 / 自定义路径时使用) - wheel 内捆绑的
aria_engine/lib/<libaria_ffi.so|dylib|dll> - 都找不到 →
RuntimeError(提示安装 wheel 或设置ARIA_FFI_LIB)
源码安装(开发)
export ARIA_FFI_LIB=/path/to/libaria_ffi.so
pip install -e .
构建 wheel(cibuildwheel)
bash scripts/build-python-ffi.sh # 编译 libaria_ffi 并拷入 aria_engine/lib/
pip install cibuildwheel
cibuildwheel --platform linux # 或 macos / windows
发布到 PyPI
GitHub Release 触发 .github/workflows/publish-pypi.yml:五平台构建 + twine upload。
需要仓库 Secret PYPI_TOKEN(PyPI API token,project-scoped,owner ariacompute)。
版本号取 tag 去 v(也支持 workflow_dispatch 手动输入)。
Metadata
Release files for aria-engine 1.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 29.6 MB
Release files / aria_engine-1.4.3-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.4.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d7a0a48d70eb775f0a0ed2ada65d09cd369be36a85b3ca83cf20ba5d8fe7c9f2
|
|
BLAKE2b-256 checksum How to use checksums |
5e279367899ee5191f21b0514fbe98704c200d64d0d41188ce26b6df1ae262c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5c2b694ac3b9742121debadb7d994dd3354b0ed493c19741c449570da15302fd
|
|
BLAKE2b-256 checksum How to use checksums |
4bffc4eb799da4a3407dc5bc940f19b848635a722fc7e47a24ba95f6870ed5aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
90ace4bd7e57a9723ee4c97a3b8b6aef2cc61bc2acf88193ace4411e4442c3d3
|
|
BLAKE2b-256 checksum How to use checksums |
fe3f8dbadab10ff0a8948f166fc5788191a17061dce3c3a01e8ac201c98039df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.3-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9893e55082392a9a1a6ca1ebf04d273d7aa837f1ba9fc3023d7ab1f71ac08161
|
|
BLAKE2b-256 checksum How to use checksums |
37b9614a432aab2fdc525ae7e7dce9be66dfd54e6b672e7146819875bf66e104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.4.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2fdf0aca0e656a6e31633e535699fc8a1d5a8e850db0f84ae46ea67ae25595d9
|
|
BLAKE2b-256 checksum How to use checksums |
3fea18c399b3c758ff752e20a9eb754598c543ec36449de0c3a66148ad9a8a25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6424ea2e77037d08c2ff2311c4249d8ec0af7a66267d2f18f2e2cb992beeb999
|
|
BLAKE2b-256 checksum How to use checksums |
8b0a1e4ac9f9a5e45b220c4d136ddf02055a03509638c0c777b7f8dd050a83e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
e375c8d111ca858f1381970885402d1a84fb0ea1e87570eb583841c715071417
|
|
BLAKE2b-256 checksum How to use checksums |
c4f3458857221aa34cfb8cb09632aa34728ec7d6e85a40150eab9f8d4ba4ad27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3b64065321278425a01ddd7e79f6b868995afea58b4730ccab3d9639619b2b36
|
|
BLAKE2b-256 checksum How to use checksums |
62eadfbbf030c881e10d55c5f8a6be08c77229e59f213d5afee08b8771c4b745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.4.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3b41b50874e68e0dcc66efad386543842a1190cd63a280b59c6015daa484e75d
|
|
BLAKE2b-256 checksum How to use checksums |
03675f616f4b8135d6a53fcca051fd3475b74aacc19ebe93342c4724b1a2c47a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6dc53db7712741e33b552e70b8251f12e23c5c4c8941af019a8a34bd9f6f9095
|
|
BLAKE2b-256 checksum How to use checksums |
cd9a2862bbbc96cfccfdb7638b10ac48fcf3958ddca2df4d0c48234de758fe7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
d5330238e7fb0b6095fb725e30a7a0742e052f492f43590300889cb80d0dfc03
|
|
BLAKE2b-256 checksum How to use checksums |
7994bb4ab6b6b68012899a9bdbb0a1b957c82896beacbb607341888542d8f51e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.3-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0efdb0560946631926f263386798fcd8ea7bba07ef2eb8248163fac52352e2eb
|
|
BLAKE2b-256 checksum How to use checksums |
b3529cb655ca1b66b16013af2ff75c92687513d816da65470bacdddb73b3de88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.4.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a5d1b5cd01d4a4e61317eb2b8aa75ba44572a886c08d6274b5c0b7e237141245
|
|
BLAKE2b-256 checksum How to use checksums |
c2aa0e06ecc37a5434b76d3efda1264aa0b41f2a935c010213ea1df1a0582216
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9e511279d9772a2c0d2673b7ae0046b28e21a4e7c3988dd11b1be83591af8a7e
|
|
BLAKE2b-256 checksum How to use checksums |
50ab1206e8a784ce4cf4c2c05b03612ab795183442efd667803f65cad910afb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
f08bd7a88902a86f97190427aaf408004da408d7bc33d6fa5ef2da1d9f538619
|
|
BLAKE2b-256 checksum How to use checksums |
97b5d3aae5b7af75d47bf97ee52dfc3ea05fd53b88780adf39d7cbc9ed4548b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / aria_engine-1.4.3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.3-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7aa61ee186a3de0873f701b9eae616e1dfbfc6200b11213482b3253e2d84a959
|
|
BLAKE2b-256 checksum How to use checksums |
dc602ac9ecfea6bc9d147f61ecb7204f2cd9b4a0997503f334fe72bc78a48160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|