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.3
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.3-cp313-cp313-win_amd64.whl
| Download URL | aria_engine-1.2.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
dcdd591db50140efe762468068f0e2842d8067c19d0baa3354f0d959b5507511
|
|
BLAKE2b-256 checksum How to use checksums |
94643a1e9f402cd85632591c51a414cc07492c05f355425b3523aa28e8be241c
|
| 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.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.3-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 |
7a882d73bb10905e76a4c9a03a65efad063d38ceb9a7f19a64846cda8f3130fe
|
|
BLAKE2b-256 checksum How to use checksums |
f928da79cb7e9d20ce7d40aa724cded9d5160b7ac0f774c6ad6826d57032a9e8
|
| 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.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.3-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 |
06a949ec0e5cc4087fd5a96d048c7e1856c455e7c559039e4870eb5b8d12b76a
|
|
BLAKE2b-256 checksum How to use checksums |
780101839970c17ac37ecd97dc3dbd7027b07c813692ee7112eb9d6d20f3ce95
|
| 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.3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.3-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 |
c15e61dbac1ab43b175a3613af8da3f32c2f35d85d6ca975d37656204e819e4a
|
|
BLAKE2b-256 checksum How to use checksums |
2f57c1afcd39d4d2dfe78f8c2d772e718a2109de4bdbfb876237b528fe2bb2cf
|
| 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.3-cp312-cp312-win_amd64.whl
| Download URL | aria_engine-1.2.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a6a6239efea2f90af9d227b08608986f0811dac580732d336623fde451537a9b
|
|
BLAKE2b-256 checksum How to use checksums |
c91ee57cb194273a834536e17823709a2b01a577c6f5e68ca595517333994d99
|
| 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.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.3-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 |
fa790faab480a15fb91d6c5e651eb39b03ca4247ad373cc80d91cfdf0af8455a
|
|
BLAKE2b-256 checksum How to use checksums |
044c09e0bc05328be4c1f404131f7c04fbcc8f88dd41f97a47a0f2bb1678d700
|
| 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.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.3-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 |
7391f860bbd8bbf9cf64bc61f5c2ca97809c7118bcf6156f97f5d1af502d20bf
|
|
BLAKE2b-256 checksum How to use checksums |
6439a28193aea2963d0bf2f9985187770e42b922df1886963330b63bd4483740
|
| 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.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.3-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 |
c22fa13c0ddd33bc5e132c9fd630882c85b65bcdaae5a75a48860faa9bd8f7c3
|
|
BLAKE2b-256 checksum How to use checksums |
cb4414c27ef9e972206243650c524669caf55942dd04ac3c33a9d99ba55df75e
|
| 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.3-cp311-cp311-win_amd64.whl
| Download URL | aria_engine-1.2.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3f2dee6b3b32f9791377b086d42134b8ffe2228f210c9a7e6c325e752043f349
|
|
BLAKE2b-256 checksum How to use checksums |
9291da84c03d4b428d3540aa5832edb5ce04dc0b7f353390c6a9d218df6a75d6
|
| 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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.3-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 |
1d15595c1f7d8228908974e6e887b9105f651cd547db70ccacd16c19f24fcd67
|
|
BLAKE2b-256 checksum How to use checksums |
a8bbbf354366fa942a7d96d337ea0867d69a0d28a3f3cad4382e05d8ab7c3e55
|
| 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.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.3-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 |
0e2306db73113bc8e81e5ec5719bbd80fc9e2143e92a5e1502c73012d961779e
|
|
BLAKE2b-256 checksum How to use checksums |
15267d821c1d5485cd833651a5ad4487bb8e29d39046140e45e481ee76969875
|
| 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.3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.3-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 |
7777a3adf5382d4ae70fb19dce934761b418900049a4b5a603384c56f35fab26
|
|
BLAKE2b-256 checksum How to use checksums |
43145385ac70bb9e9983034c659f0a76e166800ddddd5a915ea2b9764dd54542
|
| 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.3-cp310-cp310-win_amd64.whl
| Download URL | aria_engine-1.2.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
322fb7a11eb5f38cda74c9e04431d24247ff520bf2cc7fcea087804f235d10ed
|
|
BLAKE2b-256 checksum How to use checksums |
c9dfaf399e8dbdfbc9f655840d1205fb26c56a5ffea13aa0314157fde9d68e89
|
| 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.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aria_engine-1.2.3-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 |
35943e7864b20944a12a135c60576c39baa0a1e06c52a866e1a5d375e3c6a44c
|
|
BLAKE2b-256 checksum How to use checksums |
17e3834058cd653bbdbe311deb6dc8a3e43a876fd0b79e86ad727e91353b2a53
|
| 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.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aria_engine-1.2.3-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 |
3d53f02ab33d76cf0889f57cfd4bfbb04f070f1845af853ecfa897fad601823d
|
|
BLAKE2b-256 checksum How to use checksums |
bf4495285cb00a2610fa5d2756e136cd4ccdfadd1808e68e671c6bec4e4834c7
|
| 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.3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | aria_engine-1.2.3-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 |
fcd373c65d984b919e759562bd591d1923c904d340013b1b9a29c14be8ff322a
|
|
BLAKE2b-256 checksum How to use checksums |
41dcdd77418bb81cd4c166f99c50ccc9007dcb30f5eebbcafe22715b05881524
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|