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.7
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.7-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.4.7-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d267f39538cc03329f925d5e65abe03fe5ad45f10b0ae38e8790f6693c5f0879
|
|
BLAKE2b-256 checksum How to use checksums |
fa65e9a6671ac9a1fc8f14b6b0dc3e47e82e501e0f6494b35dda20836e147fcd
|
| 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.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.7-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 |
82f84ad691b26d31d26fcb755e0328b332de26c630451a8d217430f3f14c0ca0
|
|
BLAKE2b-256 checksum How to use checksums |
66b3d872a451f8d8353bb36308e00112a3f255b8901c8987aa7de5552ddbb383
|
| 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.7-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.7-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 |
f1fbcdd190be24daf00429171adf9d819d6d9b70f0ca378782e5408f0737e1d7
|
|
BLAKE2b-256 checksum How to use checksums |
c623278a0bd68d8d5c5aff8e83fbdabd032f82fa8b1807e9b2fb320a7ca03154
|
| 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.7-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.7-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 |
a142dbc7b606fc544828dfa5603f72cdf6926265059c74a0badae62d70ebe760
|
|
BLAKE2b-256 checksum How to use checksums |
685329f80e05d6de3b9568ba63318328ea59d0ce37ab3defcdfdbf260e32ffca
|
| 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.7-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.4.7-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8a9f86fdcb1d4e0d635d07269af169c11e9a9e1cf9e59ce977d6838b92813591
|
|
BLAKE2b-256 checksum How to use checksums |
a285dc35b866ea6fd83eb30ef61021c9a9f0a8ad4ff4f1672d6dd38a1038aa08
|
| 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.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.7-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 |
ab7f63d4c9b0cd4bd7656e8541edc3a59b5345388e56d4f71e8992c4806b6a73
|
|
BLAKE2b-256 checksum How to use checksums |
7255386279ddfbc9cdc60c5a24ef73f879b584f18c63c9f9a976aefa1a91fe3b
|
| 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.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.7-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 |
9380ecde823fc883a9052802d6183465b730211c260a7cea439023ac9f9c48bd
|
|
BLAKE2b-256 checksum How to use checksums |
f343820255e76bcf607e063ca8241dde8b44ad01a9a0b661c6e433ad6b99bb09
|
| 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.7-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.7-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 |
16dcc3432190afd4758b2fdf4bfffc844d30f80095ddc84735006bde0c3c6aab
|
|
BLAKE2b-256 checksum How to use checksums |
3d29938b3ea49a651849dda8a788000f148d1fe1e129c43b7dce32bb722af723
|
| 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.7-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.4.7-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1c5ece2f7d770e952e9ab152b81314cd023bbba592dfabcbf94198124697c5f7
|
|
BLAKE2b-256 checksum How to use checksums |
70e9c7a61fb5f86aaf0f31fdc16a298107258783428590d4cc7adbc1c26ad4f9
|
| 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.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.7-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 |
be476970dc726941a8eebc5070bedeaf9973304fe3f8ffcaabdd5ea9b96b2750
|
|
BLAKE2b-256 checksum How to use checksums |
95bfe767880b6b4d50c16f4e41a74293e8cf0596a9e3b31cb6e56448faa73cb8
|
| 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.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.7-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 |
5a191328306c1cbfd51807c46bd6af1ac4c9442800b3e702682463981190a5cb
|
|
BLAKE2b-256 checksum How to use checksums |
c42ea1e3ceb72b737e4a50f053538fff49d4ce3d7eb370a0b667e33aee2e4dde
|
| 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.7-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.7-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 |
d20d59a37737280d08baf6a3d209f556531612f9b56b5be686234098a8505773
|
|
BLAKE2b-256 checksum How to use checksums |
502d28e5244de6d7f848b904567dcf4bab1a06ddc9724ef38de335db69afb883
|
| 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.7-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.4.7-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f01d1f74bf3845c7a49db0f34b300c92a360808188ffd1b82593bcf1e7333309
|
|
BLAKE2b-256 checksum How to use checksums |
2527837bd9e9f2490fef7177bebfccae0ddfbde1238e0fdb3e39ba0431e89c78
|
| 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.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.4.7-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 |
0a5a6dc0cc6fbc86c4a043d81ee96728c9fb64e032c3ef8e7779eaf008f53f26
|
|
BLAKE2b-256 checksum How to use checksums |
8ad5df4fb59b883d52248844309a13907477e84437e33f4f04399cb9b60cc29e
|
| 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.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.4.7-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 |
ff07b9b81cb37fd8f536a277d4daac9c224d6e75c3283b260caa596b759a7b3f
|
|
BLAKE2b-256 checksum How to use checksums |
431ce97bbc841f9a66646168a71881114d2a7545f338022936428005998fe7ef
|
| 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.7-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.4.7-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 |
e6d3cc8b3cbe3d8217c38db61f0708269aa45515e474d86f688f04c84d35144a
|
|
BLAKE2b-256 checksum How to use checksums |
1b6f32c3f4a9bd3c67ce66aff2b7ba43801818864bd4844bbbd339b882dec8e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|