Skip to main content

python-iotbot

pypi python-version

Install

pip install python-iotbot -i https://pypi.org/simple --upgrade

Quick Start

from iotbot import IOTBOT, GroupMsg

bot = IOTBOT(your_bot_qq)


@bot.on_group_msg
def group(ctx: GroupMsg):
    print(f"""
{ctx.FromNickName}在{ctx.MsgTime}的时候,发了一个类型是{ctx.MsgType}的消息,内容为:
{ctx.Content}""")
    print(ctx.CurrentQQ)


bot.run()

documentation

CHANGELOG

LICENSE

MIT

CHANGELOG

0.2.3 - 2020-05-15

  1. 更多 action

  2. 每个 action 除默认参数外,还可设置:

    • api_path default=/v1/LuaApiCaller
    • iot_timeout default=self.timeout=10 IOTBOT 端处理允许等待的时间
    • bot_qq default=self.qq 机器人 QQ 号

1.0.0 - 2020-05-28

大改动

  1. 插件化
  2. 效率更高,不漏消息
  3. 更多快捷方法
  4. 更多自定义参数

1.1.0 - 2020-06-19

  1. 无需重启即可更新插件,正常调用refresh_plugins方法即可
  2. 改了下刷新插件后的显示信息
  3. 增加刷新 key 二次登陆 Action
  4. 改善了生成模板

2.0.0

  1. 支持队列发送
  2. 支持中间件,可用于传递配置
  3. 优化数据解析,提供解析更详细的函数
  4. ...

2.1.0

  1. 增加 webhook 功能,方便做远程服务
  2. 废弃环境变量的配置方式,使用.iotbot.json进行配置
  3. sugar 发送图片函数增加文字参数

2.2.0

  1. 优化插件管理

2.2.1

  1. 优化中间件的处理
  2. 好友白名单改为好友黑名单
  3. 配置文件增加群、好友黑名单配置项
  4. Action 增加部分方法

2.3.1

  1. 使用第三方库替代原来手动配置的 logger,日志不那么粗糙了
  2. 移除 Action 中的设置日志参数

2.3.2

  1. windows 上编码错误

2.3.4

  1. 新增设置/取消管理员 Action
  2. Action 对象的 host,port...等属性改为公开属性
  3. 发送请求使用 session
  4. GroupAdminsysnotifyEventMsgQQ 群系统消息通知消息完善 ...

2.4.0

  1. 移除 Action 每分钟限制发送频率的功能
  2. 优化发送队列

2.4.1

  1. action 检查 Ret 值时首先判断该字段是否存在

2.4.2

  1. 封装获取包括群主在内的管理员方法

2.5.0

  1. 优化插件管理,使用文件存储停用的插件信息
  2. 添加 is_botself装饰器,只接收机器人自身消息
  3. 去除冗余代码

2.5.1

  1. 封装转发视频给群(repost_video_to_group)/好友(repost_video_to_friend)两个 action
  2. 增加解析视频消息的 refine 函数

2.5.2

  1. 修正误将 GetWebConn 作为心跳的错误

2.5.3

  1. refine 函数不修改原上下文对象

2.6.0

  1. 添加定时任务功能

2.6.1

  1. 增加对发送错误码的描述

2.6.2

  1. 优化 sugar 函数,增加对临时会话的支持
  2. 好友消息增加字段 TempUin(临时会话的入口群聊 id)
  3. refine 图片消息后对象的 GroupPic 列表成员由原始字典变为单独的图片对象

2.6.4

  1. 增加辅助构建宏模块
  2. 对旧版 atUser 参数做兼容
  3. 模块 refine_message 更名为 refine

2.7.0

  1. 可添加连接成功或断开连接后执行的钩子函数

2.7.1

  1. commit

2.7.2

  1. 增加接收函数装饰器(startswith)
  2. 修改接收函数装饰器equal_content逻辑

2.7.3

  1. 装饰器 equal_content 少一步对 MsgType 的判断

2.7.4

  1. 配置方面更新
  2. 小部分兼容 6.0.0 新功能

Metadata

Release files for python-iotbot 2.7.4

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

Source distribution (sdist)

Source distribution for python-iotbot 2.7.4
File Size Uploaded Provenance
python-iotbot-2.7.4.tar.gz 27.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-iotbot 2.7.4
File Interpreter ABI Platform
python_iotbot-2.7.4-py3-none-any.whl Python 3 none any Details

Total release size: 60.0 kB

Release files / python-iotbot-2.7.4.tar.gz

Download URL python-iotbot-2.7.4.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
32b9185c6d62024f5c52167f4c751a1bfc56ebec9342ef30293702e93096660d
BLAKE2b-256 checksum
How to use checksums
98f01c13bcfc62db4bfa9e15bfda64877bef74da67614c3355b0d9a1a60b519b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

Release files / python_iotbot-2.7.4-py3-none-any.whl

Download URL python_iotbot-2.7.4-py3-none-any.whl
Size 32.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
076497f6045293d920e99762ad5d30b981d45e9255bc49d0daa52bc624269b94
BLAKE2b-256 checksum
How to use checksums
44c33b2a1c7b65469a255e2c07cd3aece679241c1ef342bd60c8728b88be4bab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

Security for python-iotbot 2.7.4

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.

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