Skip to main content

Python SDK for Luo9 Bot — FFI message bus, command parsing, and payload types

Project description

luo9-sdk

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

安装

pip install luo9-sdk

快速使用

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

luo9_sdk-0.1.0.tar.gz (271.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

luo9_sdk-0.1.0-py3-none-any.whl (272.1 kB view details)

Uploaded Python 3

File details

Details for the file luo9_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: luo9_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 271.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for luo9_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6415a19e4a75af7943f5d23c94edf84365d8b6ed4a92ba828892098f0ec716b3
MD5 59766ac53fb41a6a8c3d16919dba8c4b
BLAKE2b-256 98385e6cc11bc404fa888803cfd5ce91ec7c602c2538132f1d484ea1e56b32db

See more details on using hashes here.

File details

Details for the file luo9_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: luo9_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 272.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for luo9_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b19a6f0f39c60e6f75409a49947c93c342cb29539e8e46c4f25a08d0cda9ba6
MD5 f40cf5d15e4be9d8120978a9d121984b
BLAKE2b-256 19f61204512484a2a4d9a4c971a4c4952cbb212ca7fcfbf4177a66b32db6063f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page