轻量化的onebot v11 sdk
Project description
介绍
eridanus-dep是一个轻量化的onebot v11 sdk,整体风格参考了yirimirai
Eridanus是基于eridanus-dep开发的onebot应用,你可以通过参考Eridanus的源码来了解eridanus-dep的使用方法。
安装
pip install eridanus-dep
或
pip install --upgrade eridanus-dep
需要开启onebot实现的正向ws端口3001,access_token留空不要设置。
示例
from Eridanus.adapters.websocket_adapter import WebSocketBot
from Eridanus.event.events import GroupMessageEvent
bot = WebSocketBot('ws://127.0.0.1:3001',all_str_id=False)
#由于不同Onebot实现消息id有用int的(napcat/llob),也有用str的(Lagrange),因此提供all_str_id选项,在发送前自动处理id
#bot = WebSocketBot('ws://127.0.0.1:3001',blocked_loggers=["DEBUG", "INFO_MSG"]) #像这样屏蔽指定logger
@bot.on(GroupMessageEvent)
async def _(event: GroupMessageEvent):
print(event)
await bot.send(event, 'Hello, world!')
bot.run()
文档
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eridanus_dep-0.1.3.tar.gz
(33.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eridanus_dep-0.1.3.tar.gz.
File metadata
- Download URL: eridanus_dep-0.1.3.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b0dd27837392216ef80e1ed0c577d68ef119284df6c67bf2cebb40368d0f915
|
|
| MD5 |
2d1089c22598a353f0e23143c4894cb7
|
|
| BLAKE2b-256 |
a594e3c98fba695ecb59fc12752c6631c374a947b6858b3c1c5aff35f4aa5bd4
|
File details
Details for the file eridanus_dep-0.1.3-py3-none-any.whl.
File metadata
- Download URL: eridanus_dep-0.1.3-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9dae15e5b085ef29f072c6ae9c6d25650035689e1974a0a61f68ad07e5ab69f8
|
|
| MD5 |
fc3939c795b72864fc092ebe21c88c60
|
|
| BLAKE2b-256 |
46daeef7a43fcc9717501922bfff20e197b64d4f0cdc02ee92d667afedd3c461
|