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.1.tar.gz (294.9 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.1-py3-none-any.whl (295.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: luo9_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 294.9 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.1.tar.gz
Algorithm Hash digest
SHA256 ac72d5e20b75fe353dd7772bccd312872dd6cad471d94d86aef3ef5eda884b2d
MD5 dd8b35b0780c3a65a4091eea454604fa
BLAKE2b-256 eb2607bd1b58e9f2fe7090e002e091b85ae5184aa76ce0a094bfb7dd3ad37e61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: luo9_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 295.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ee91d2edb6a386911953724bc23e2b4599ca2549f414238afe2564f08c1b1bb
MD5 350e9bba4d037814ad2ae647f6885a32
BLAKE2b-256 f4e9ddb12f2bba7df783258cc3b07b6bd7adf433560e231f812b6e84dcca0e51

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