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.2.0
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.2.0-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.2.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a06cf9cea6748c1565924f32a74816dc8e54bd16c201c25a6f598a7fc47fd6fb
|
|
BLAKE2b-256 checksum How to use checksums |
56ae52839d7287f8017e0a9e5239e21a89df2d5aa714a23aa91b5020ce73c0ef
|
| 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.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.0-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 |
a8fa459b0518ec8671d71940ec29ed446f3890e5286f3e9ef09642a456d6ab46
|
|
BLAKE2b-256 checksum How to use checksums |
499909636703d096184632c74ba16f4da860667c0cb7513c388dc80274f8d72c
|
| 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.2.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.0-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 |
bd2f84055a852642a8edccd22aacde7706d9d5ef16ed55b970441117c08ef5ec
|
|
BLAKE2b-256 checksum How to use checksums |
dea1e45a28078f87395b939e3d4086c8d0435e9119a2c2f7bae6e7754e59355c
|
| 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.2.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.0-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 |
497023c79c2899da4156878ab3d8bc697a7cccd710b891d13341c00960369bfc
|
|
BLAKE2b-256 checksum How to use checksums |
5d593e645f81aaeb3b4c853327c623fc7584ceceaed787ba91f5e6a2f97add37
|
| 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.2.0-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7083763858bc189d6b23940c196c7c3e9e5aee45bed841327295862aec0bdc75
|
|
BLAKE2b-256 checksum How to use checksums |
71ec45fc13b922d2675333644f33942f46d1b280a445a865f42b1bebeea59213
|
| 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.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.0-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 |
47180824a36fbafe17a6b1af44d41e64652c3d772c3c70b304816a416e507d28
|
|
BLAKE2b-256 checksum How to use checksums |
05ddc4832f96ae9f1f6f7113e8a376227d5ffd58f302fb57ba5b427f8c10af20
|
| 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.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.0-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 |
25e94c813773d4d5bcb93e1eea89f826702345745c52d74825ac772286b36cc1
|
|
BLAKE2b-256 checksum How to use checksums |
6edbcea201bb7f3a47e395359d01184fe623987a02eae3a832dbed163fb644ae
|
| 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.2.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.0-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 |
ede133a400239c4dc970f7b8aa66f1f1dee27357c685ac6047fa3efb5d72de09
|
|
BLAKE2b-256 checksum How to use checksums |
f7276d54624d9af96533e277c5e2e77d1e7dcd1210127a5c7fcb8815437f4005
|
| 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.2.0-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0b3069f6bacfca65f19bd80e93788283f03fd7cc7828dfe84e153ab1f450e864
|
|
BLAKE2b-256 checksum How to use checksums |
f8db338cee93fc2acd154c13f432c711848bccf9c5bda7f582df420817707488
|
| 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.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.0-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 |
f502252d1efcc784ebf52f217bbec4cabbeeb75611c445a8b5c73ce74f21b641
|
|
BLAKE2b-256 checksum How to use checksums |
f67b78b89114a2d46b5d3428f9edd19f6c42975b47e78d5f162fe3524d232c0e
|
| 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.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.0-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 |
c6da12f0d5a9debabe28d25d2bab4b7ff933dc214e0e0d47def6fbab89b16ea8
|
|
BLAKE2b-256 checksum How to use checksums |
37e42c431d77ba925c5c4f361afcc05b72750911d0a2b2ac79ffb36cb55e6978
|
| 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.2.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.0-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 |
e0e35143139dc8503774f6086486564e5903d45d70f31bc33ad8c966dc90976d
|
|
BLAKE2b-256 checksum How to use checksums |
4767916399e52562fcb649cfb2ffaa1e908f4c2d3ad5d6dbefe64529d23b5e5b
|
| 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.2.0-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a917e8b7da63d922b35f0d1043db1b2031d80b805bcf3aba1f12bc497657a13f
|
|
BLAKE2b-256 checksum How to use checksums |
a68a78ffee2b3fcfdeb0c7cfed55dfc1b2578b7b27719123baabb034a56e014f
|
| 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.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.0-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 |
9327f6872f019a9a439886dce2f37c3109cd42fa08f36a689201c4a0e1715fff
|
|
BLAKE2b-256 checksum How to use checksums |
f32c3a667a90232e265da628736d845eb4d1a06a04fd4125f0d97b531e51152d
|
| 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.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.0-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 |
a8f1bb5033520c81cddca890dd62cb584a52562a535cc1639f57cbaf8eba961f
|
|
BLAKE2b-256 checksum How to use checksums |
5160c44a0304a96067b82510d3ca8513e17f656e9f729e7ed9f6b35743793a8a
|
| 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.2.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.0-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 |
777cd8f509b0476f451f4298e45d19e3c32c6c93aca717d55e2a0e7e50007e46
|
|
BLAKE2b-256 checksum How to use checksums |
078e0ebf8de83b73db2332ff744579fbbc6d9e0c4cdf99b03d4a6d800c48d7f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|