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.3.1
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.3.1-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.3.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d415e081958b1f990fe0ddfb47531cea9708f6688a615d664e5105c96078aab1
|
|
BLAKE2b-256 checksum How to use checksums |
f94cf45cab056343669afe8b0719ac91d97f97cf5d2f66a9a76af1755b2a9109
|
| 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.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.3.1-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 |
ec31c5ead84a5a804cdc198bf4e8614f67b10b58169fcea5592fd767ba0e14f1
|
|
BLAKE2b-256 checksum How to use checksums |
f3850df03d995b5b163b959f54e04723f06687db29aa128966a5f182aa188635
|
| 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.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.3.1-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 |
fab2ca91d40252a87d6f3a3e4ee2bcc5d64a08982c03b58074602aeeb3b0513d
|
|
BLAKE2b-256 checksum How to use checksums |
a1601596a4c8ea8d20724765364f47d139b891c88cbc42879d4f1cfe67055d1f
|
| 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.3.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.3.1-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 |
9d5c2c0539fee78d424fbf11353d769c7784bf4c478630486f72d9aa867a3e1b
|
|
BLAKE2b-256 checksum How to use checksums |
d14b14e1f8474ad78ff82b8fbf8f76b058926f6f2ff1636e92e8ce8b7f8962e4
|
| 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.3.1-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.3.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
cdcc5c5a1f483800ba9935f8a83ba226311ef810f60890326a0ee2043780d0a3
|
|
BLAKE2b-256 checksum How to use checksums |
055ed92d044e9c9f1bc58cf1aa3f7bd8f14781113e28dd38e17c654d07c6dff3
|
| 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.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.3.1-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 |
21552ac11ba6902c7aa458f6124b4fd7a565eba4eeafd1f06bdb71570ca57d8e
|
|
BLAKE2b-256 checksum How to use checksums |
b593825bb67a6847cd6d277549f553f7d5f3272d19f79454583870400054486b
|
| 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.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.3.1-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 |
4b3d4345fe4dfd135372405599083f5dbc9511e0bb9931aa30797b4f9f77ffad
|
|
BLAKE2b-256 checksum How to use checksums |
882eca650377c434ca00c4a0996873d72b7847566a1a9f66cf87796cde75296b
|
| 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.3.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.3.1-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 |
eff855c6a093da34cd5fc4fb340866d8c006585993a0f7c69f6dcfeab498e947
|
|
BLAKE2b-256 checksum How to use checksums |
1bff0fa523e58108af72220bbf3722259894537e97c87b1abad10f526411ecb7
|
| 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.3.1-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.3.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d779d111cc22700b5c14f958d7a1a179086e500fb2c6005081774743baaa888b
|
|
BLAKE2b-256 checksum How to use checksums |
db278e46111c2add2abd08b017dad9cb6ef338f3e25e4e5afad847c09379eaaa
|
| 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.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.3.1-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 |
a82999ba0ad65f5fac7b0f3b60923c1e118d20d2b12407c859acb89395efb44a
|
|
BLAKE2b-256 checksum How to use checksums |
89483a2425e6c2b450bc8293b5009d2b202c7508ae4e4c33f1fd678a6295a757
|
| 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.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.3.1-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 |
570c41fea7168bfa57ef3882657e0300c3c47acb6132996a8da9d861cc654d96
|
|
BLAKE2b-256 checksum How to use checksums |
a95720295d22aca19bb88a09fc042c1dc51c2219a8e020230b24c12826ccd76c
|
| 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.3.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.3.1-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 |
4552a6980388b167958874dd631bb39ee51e7f4957b3f2d0fbb0821a359fc097
|
|
BLAKE2b-256 checksum How to use checksums |
d159e29f3d368a31d6c904803029aa10075d34e40729ff4f6c2668d074f0e7b4
|
| 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.3.1-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.3.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dab774afb56df9b1a0553f00d95d3aa46f49b85f78824d82a21ced3fb4828853
|
|
BLAKE2b-256 checksum How to use checksums |
7f414e9ea8f6ef090dd94888f797aeb6a28e8c02b0b407d0a5df9269bd5928e5
|
| 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.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.3.1-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 |
7bf7ee49ea15dae870cfe5b4f71cc4bb8a7beeca78af56a607e13b51d0cb06f6
|
|
BLAKE2b-256 checksum How to use checksums |
ff4de06c8206157629a37346a44061a4aeaf574ce648517aa69ca34cf9db8142
|
| 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.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.3.1-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 |
5110fef4ed5d21eabe66e8635ba8053851ed16659641d2ea51d4074513869882
|
|
BLAKE2b-256 checksum How to use checksums |
772f4147924d8bc2e7b4a710bbad3cd41b46aa554e2310f3648569e9a88f0791
|
| 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.3.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.3.1-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 |
a8ab4d6f2faab6eb087fe2d181ca6c0637e90f34600b6066a3d12b735367b3d5
|
|
BLAKE2b-256 checksum How to use checksums |
428e4812aafe5dc2b310b4fd329ed443a126710523a468804d6438d0f91b0c28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|