Skip to main content

APIXIS

中文 | English

面向 Python asyncio 应用的事件驱动图编排。

PyPI Python License

源码 · 问题 · 文档 · 示例

APIXIS 提供两个可组合的运行时:

  • 一个异步事件系统,支持通配符订阅、有序处理器、背压和本地事件队列;
  • 一个有状态图运行时,支持命令驱动的步骤、并行节点、快照、流式处理以及中断/恢复工作流。

需要 Python 3.12+。运行时 API 专为 asyncio 设计。

安装

pip install apixis

要安装本地检出,请在仓库根目录运行:

python -m pip install .

如需开发和发布工具:

python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest

使用 uv 时,请使用 uv sync --extra dev --locked 和 uv run --extra dev pytest。 运行静态代码检查:uv run --extra dev ruff check .。Ruff 检查常见代码错误和未使用的导入等问题,不执行静态类型检查。

项目采用 src 布局,测试位于仓库根目录的 tests/,所有开发命令均在仓库根目录执行:

src/apixis/     # 可安装的 Python 包
tests/          # 单元、集成和性能测试
docs/           # 项目文档
scripts/        # 基准与安装检查脚本
pyproject.toml  # 构建、依赖和工具配置

快速开始

import asyncio

from apixis import GraphManager, create_core, start_core, close_core


def increment(state: dict) -> dict:
    return {"value": state["value"] + 1}


async def master() -> None:
    create_core()
    graph = (
        GraphManager()
        .add_node(increment)
        .compile_graph(entry_point="increment")
    )
    try:
        await start_core()
        result = await graph.invoke({"value": 1})
        print(result)  # {'value': 2}
    finally:
        graph.decompose()
        await close_core()


asyncio.run(master())

文档

许可证

根据 Apache License 2.0 授权。请参阅 LICENSE。


APIXIS

English | 中文

Event-driven graph orchestration for Python asyncio applications.

PyPI Python License Discord QQ群

Source · Issues · Documentation · Example

APIXIS provides two composable runtimes:

  • an asynchronous event system with wildcard subscriptions, ordered handlers, backpressure, and a local event queue;
  • a stateful graph runtime with Command-driven steps, parallel nodes, snapshots, streaming, and interruption/resume workflows.

Python 3.12+ is required. Runtime APIs are designed for asyncio.

Install

pip install apixis

To install a local checkout, run from the repository root:

python -m pip install .

For development and release tools:

python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest

With uv, use uv sync --extra dev --locked and uv run --extra dev pytest. Run static code checks with uv run --extra dev ruff check .. Ruff checks common code errors and unused imports; it does not perform static type checking.

The project uses a src layout: the installable package lives in src/apixis/, and unit, integration and performance tests live in the root tests/ directory. Run development commands from the repository root.

Quick start

import asyncio

from apixis import GraphManager, create_core, start_core, close_core


def increment(state: dict) -> dict:
    return {"value": state["value"] + 1}


async def master() -> None:
    create_core()
    graph = (
        GraphManager()
        .add_node(increment)
        .compile_graph(entry_point="increment")
    )
    try:
        await start_core()
        result = await graph.invoke({"value": 1})
        print(result)  # {'value': 2}
    finally:
        graph.decompose()
        await close_core()


asyncio.run(master())

Documentation

License

Licensed under the Apache License 2.0. See LICENSE.

Metadata

Release files for apixis 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apixis 3.0.0
File Size Uploaded Provenance Actions
apixis-3.0.0.tar.gz 335.4 kB Without provenance Details for apixis-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apixis 3.0.0
File Interpreter ABI Platform Actions
apixis-3.0.0-py3-none-any.whl Python 3 none any Details for apixis-3.0.0-py3-none-any.whl

Total release size: 421.1 kB

Release files / apixis-3.0.0.tar.gz

Download URL apixis-3.0.0.tar.gz
Size 335.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6b306726015eb5ec4d6120d0321a1d15aa940db5a657cb6433a7b1559f579980
BLAKE2b-256 checksum
How to use checksums
ac1ae6b3b1fb623c5c1719bcaa43ed120f3a48b7ff492fb90acc3e1fc59fcf5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release files / apixis-3.0.0-py3-none-any.whl

Download URL apixis-3.0.0-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60933d2755f1e8769d1ba2d5e1c098d077e36cdeacf1068b2af1a60fe4411b5a
BLAKE2b-256 checksum
How to use checksums
4647ed782bfd428be450999336fd8bb34149266524ef420ccb5dfbcad991558a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Security for apixis 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page