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.5.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.6 MB
Release files / aria_engine-1.5.0-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.5.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5459b6f899945f77b4e641da067ad8b031ad3880830dfde294af7d80f7237945
|
|
BLAKE2b-256 checksum How to use checksums |
e7fe72dff4ddd007c0be4ff40030aa72a5980ae37799ec306b972b2d48299792
|
| 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.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.5.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 |
4954c223fccc12ec919e9c7a3356eb0c98838922d483a4f5087478f1b7494dc1
|
|
BLAKE2b-256 checksum How to use checksums |
da4ed79805ada7d340f2d544a298615fb66a34fdf45e19b02459ca56e05f0daa
|
| 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.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.5.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 |
7c141275e2620ff48ed99f0c6ef0420756f6fe583aa39fb29d48a7c520ecc140
|
|
BLAKE2b-256 checksum How to use checksums |
eac404b1473611adf2f337a31ccc5d0d346d874c4897decabf5a546fb8c6cc49
|
| 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.5.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.5.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 |
8010ba7b7828a03e7e76f30490e602643517ff3090537898c44986c9779aaf12
|
|
BLAKE2b-256 checksum How to use checksums |
d41be10baddd9b51faf599e040eafb93c3a28ec517a46081f2fefc0b04ae8a84
|
| 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.5.0-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.5.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e153b1dbc84c5789f146caf37a415c36e4ee2dc130b64af596831ac5950dd9f3
|
|
BLAKE2b-256 checksum How to use checksums |
24dc117880bdea0819f109f8ab81f6344a41d1d9826d4a7d6707e401f054fbee
|
| 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.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.5.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 |
780f0cd6347fff3fa757a5e7e91ef43f68716f90c78561d78cbdba7b92802894
|
|
BLAKE2b-256 checksum How to use checksums |
7e9e6501a9d1fac4b4f072019666ce638b5d8fae7aff75efe3aa4f6aae20ce34
|
| 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.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.5.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 |
dc19075b1f42c4e512a1ba4f034d9ca4e53de7f2d4d3d6fab9af0ad480d492c2
|
|
BLAKE2b-256 checksum How to use checksums |
d313eb94f0edafada1b5e342d56c81c4894546218bc7ad438029ecf5d55cd01e
|
| 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.5.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.5.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 |
f69c4e19d056b8b2ab4b2bf1ed867f9ec526936606c7e633db9c85a52a2cb27f
|
|
BLAKE2b-256 checksum How to use checksums |
e81707575f642ac0c6417b0331038e849c2c217d7f81dc0bfee310b3dc8f11a7
|
| 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.5.0-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.5.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ac26f0b154ce020ee4a4882edfabedd9dfe03bb46c44635056dba8be320e56eb
|
|
BLAKE2b-256 checksum How to use checksums |
31be8b9a4590ca8d5af95ae7cf8ad3cd3481a27d72bfee0fb896291b95c24ef1
|
| 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.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.5.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 |
3563e5521d68add2fe76c6dd4507a21d6580c5dafc3ee6360a3e4d18dde1100e
|
|
BLAKE2b-256 checksum How to use checksums |
39965d142726f835b0700a9d0ab530724229f532f33bfcb0bd4124cf8da82e66
|
| 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.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.5.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 |
ec5aebf3477e2bbda34560e3dd7eeed649ff2299f5563a69cff710e89820f7ec
|
|
BLAKE2b-256 checksum How to use checksums |
27264db346777221faec46e97ce9ee88e65c28aa1f4561c6a7839a1a519aa5bd
|
| 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.5.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.5.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 |
74fd560aafddb7ff37a91bd4d5738593e77714b2bcadb121242d720b54119130
|
|
BLAKE2b-256 checksum How to use checksums |
6a35cb8ec2fc94029535f2a8d60ed09b5de7aa960051aa9b36dd29a08bca4f9d
|
| 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.5.0-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.5.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1a952f3b864ea51dd04b62de113066fe9351b5c364440b935eb87e4f75f1c93a
|
|
BLAKE2b-256 checksum How to use checksums |
95c6a06eddf399238c605ec3a0664808f8d16c309121aaab3997b40787491a6f
|
| 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.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.5.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 |
ccf3de18e8be7e81789ca0bb9583804d150cb0b325dde11ef34714964366b541
|
|
BLAKE2b-256 checksum How to use checksums |
6dbc8e1fd5e0abc3fa8bbba15d6ab42d87e9562ea4550ea62cee5ccde2c8cbcf
|
| 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.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.5.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 |
1383a84fa88ae73ae0697bd29f80919722c4de493faa0b805571edbd93e6b3d6
|
|
BLAKE2b-256 checksum How to use checksums |
23c2d2644a97b1050d5edd9755d91400e2ed80708c0510452d4c2edf3ea739ed
|
| 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.5.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.5.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 |
d4993dd903b1018a3b87a5d2133f46f555854eaa0a2cad61af3cce117f7213e5
|
|
BLAKE2b-256 checksum How to use checksums |
e664e8779d4609f9a433bcef5658affb0aefa55179a078e4ca6a807a20b513ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|