Metadata-Version: 2.4
Name: luo9-sdk
Version: 0.1.0
Summary: Python SDK for Luo9 Bot — FFI message bus, command parsing, and payload types
Author-email: luoy-oss <2557657882@qq.com>
License: GPL-3.0
Project-URL: Homepage, https://www.drluo.top
Project-URL: Repository, https://github.com/luoy-oss/luo9_sdk
Project-URL: Documentation, https://www.drluo.top/posts/luo9_sdk
Keywords: bot,luo9,sdk,plugin,ffi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# luo9-sdk

Python SDK for Luo9 Bot — 基于 FFI 消息总线的插件开发框架。

## 安装

```bash
pip install luo9-sdk
```

## 快速使用

```python
from luo9_sdk import Bus, Bot, Command, PrefixMode, BusPayload

# 初始化总线
Bus.init()

# 订阅 topic
sub = Bus.topic("luo9_message").subscribe()

# 发送消息
Bot.send_group_msg(group_id, "Hello!")

# 解析命令
cmd = Command.parse("/echo hello world", "echo", PrefixMode.Required("/"))
if cmd:
    print(cmd.args())  # ["hello", "world"]
```

## API 模块

| 模块 | 说明 |
|---|---|
| `Bus` / `Topic` | 消息总线：init / subscribe / publish / pop / wait_pop |
| `Bot` | 机器人操作：send_group_msg / send_private_msg |
| `Command` / `PrefixMode` | 命令解析：parse / args / on / otherwise |
| `BusPayload` | 载荷解析：Message / MetaEvent / Notice |
