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.9
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.5 MB
Release files / aria_engine-1.4.9-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.4.9-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
aaf97ac003805ff8765aa0053f009f2221083e0cce6414424f4d7cb88e6f314b
|
|
BLAKE2b-256 checksum How to use checksums |
dff3fbef7c9fe161198735af4c701f1f0b2bad297e4d96b9f9a563e4e2fb7ab6
|
| 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.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.9-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 |
b880aab48b930418e6791963c89b8245d7feecb32b65028d0915683fa00a21e3
|
|
BLAKE2b-256 checksum How to use checksums |
d0b36fbf4ef3922ee1b21002329dcc3ae5a15e07f8757264e4aa842aa1f404f7
|
| 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.9-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.9-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 |
b0b88a15b1594cbe92481b0c7e472d959df22c72e764dc3bb4311402955164aa
|
|
BLAKE2b-256 checksum How to use checksums |
ddac76e2074d4cbab84f34eba1a1c7a2e2ade1fb9294a7d42150cfab5d0c49b7
|
| 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.9-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.9-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 |
c99146450fb2260533c24d1a8862ba871313230887af5e568570a6ea2c43b5d0
|
|
BLAKE2b-256 checksum How to use checksums |
0ffebb3ceb6a3ed9c46f44bc5dd2b6b2c9f5c97ffa5aa4099f578321cf987156
|
| 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.9-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.4.9-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4ff8d89b2766df5e383b051d9f120284b21c83262ea54d5c0cea7f25840a3d55
|
|
BLAKE2b-256 checksum How to use checksums |
016c3b53ff11b05ecc4e65b5d3dd84fc192758b5762800943cbd7d07c815fea4
|
| 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.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.9-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 |
323bccf416ed2457a213fdf4c3f9aae7785262ef3c83285f44fa1851ee854ac4
|
|
BLAKE2b-256 checksum How to use checksums |
73ea247d5d2cded500d60ace96d044b70e41fd3317f5ef68029e23870a167a6f
|
| 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.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.9-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 |
b35deccd780b1297d9937a6838908f8b660d489c791cf6fd79ac01bde3ed957f
|
|
BLAKE2b-256 checksum How to use checksums |
d1d070d02de953d9d0d125eb122920c86bfd618e928416e9ba7969213ce81370
|
| 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.9-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.9-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 |
482860f57ef362757de95d9055655d1e0f850192cfbe842320aa89de119b9c3b
|
|
BLAKE2b-256 checksum How to use checksums |
2186186d2d6a88f5a5d5391ac95b621bee000532dcba6bd28c9a5e0f800c8c84
|
| 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.9-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.4.9-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ceae3143854655e0e265b593c65ad2adce871991602c601bf50408893b06ceb8
|
|
BLAKE2b-256 checksum How to use checksums |
8bb7192342669207b938dcbfd403551858d61276781d51d0b87e1a64e831fc46
|
| 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.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.9-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 |
b1b030068e459d142e50b5c680ed8223558becd243e789309621561ca1c69ad1
|
|
BLAKE2b-256 checksum How to use checksums |
08fc1b43c6e7ef633dcb1f791d6afd2c4ef5b140084b376f135c7b934e4ffc28
|
| 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.9-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.9-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 |
d4acaf25e99fe9874c4794c73a031d2d944077970f5e54835d47a00dd6214274
|
|
BLAKE2b-256 checksum How to use checksums |
d32c70d4eff107e58ca12e58d22c62f7271bd2ff5d5a9430021ceec7a8fdcf6b
|
| 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.9-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.9-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 |
f0ab363ff0ce4795d3e0289359eaa0e9dfbea6127fa2fc39861743a351499462
|
|
BLAKE2b-256 checksum How to use checksums |
aa60f7dd42d09726c41577307a0d409b3d05611503b485bc9af66fdf1ae77660
|
| 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.9-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.4.9-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1523f41abe4bb4a146760661ace86185aa19dc13e4315ddfc63c26b969b6a4c0
|
|
BLAKE2b-256 checksum How to use checksums |
e25e44338d65e117c17dfcdd21a22926b9c51d27ca138e03c8e199812c3f4b41
|
| 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.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.9-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 |
e5072fbe55a3f87220dd7316b1b5381638e2cf7c0038d0cf4beb8b2ea20193a0
|
|
BLAKE2b-256 checksum How to use checksums |
6cabf0a746cf15c3eec1bc45cc048747d538240d52d1b6a748621d7a9f455022
|
| 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.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.9-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 |
6336f3f66f96a048398133ae2640df413a8e38e32ec3b3aca7d8393631b1d8d4
|
|
BLAKE2b-256 checksum How to use checksums |
1da3f6e8af8360a4342b3ac4c9050ecab4e4e7b3cbc16a4cccd8e45212c98f34
|
| 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.9-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.9-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 |
776e1b9ca95703b059a466abb050eeae732c011b23e418a07ec218aa554f2f48
|
|
BLAKE2b-256 checksum How to use checksums |
1cce8e27a8bb871a0b27e6254fd7f81f43bec0a48754fb43bd780c6e533361b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|