Metadata-Version: 2.1
Name: melobot
Version: 2.5.8
Summary: A qq bot development framework with friendly APIs, session control and plugin-supported.
Author-Email: aicorein <melodyecho@glowmem.com>
License: AGPL3
Project-URL: Homepage, https://github.com/aicorein/melobot
Requires-Python: >=3.10
Requires-Dist: coloredlogs>=15.0.1
Requires-Dist: uvloop>=0.17.0; platform_system == "Linux"
Requires-Dist: websockets>=10.4
Requires-Dist: better-exceptions==0.3.3
Requires-Dist: rich>=13.7.1
Requires-Dist: typing-extensions>=4.10.0
Requires-Dist: aiohttp>=3.9.3
Description-Content-Type: text/markdown

<div align="center">
  <img width=200 src="https://github.com/aicorein/melobot/blob/main/docs/source/_static/logo.png?raw=true" />
  <h1>MeloBot</h1>
  <p>
    <strong>插件化管理、基于异步会话机制的 qq 机器人开发框架</strong>
  </p>
  <p align="center">
    <a href="https://raw.githubusercontent.com/aicorein/melobot/main/LICENSE"><img src="https://img.shields.io/github/license/aicorein/melobot" alt="license"></a>
    <a href="https://docs.melobot.org/"><img src="https://img.shields.io/badge/doc-latest-blue.svg" alt="MeloBot docs"></a>
    <a href="https://github.com/aicorein/melobot"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/aicorein/melobot"></a>
    <a href="https://github.com/howmanybots/onebot/blob/master/README.md"><img src="https://img.shields.io/badge/OneBot-v11-blue?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAADAwMHBwceHh4UFBQNDQ0ZGRkoKCgvLy8iIiLWSdWYAAAAAXRSTlMAQObYZgAAAQVJREFUSMftlM0RgjAQhV+0ATYK6i1Xb+iMd0qgBEqgBEuwBOxU2QDKsjvojQPvkJ/ZL5sXkgWrFirK4MibYUdE3OR2nEpuKz1/q8CdNxNQgthZCXYVLjyoDQftaKuniHHWRnPh2GCUetR2/9HsMAXyUT4/3UHwtQT2AggSCGKeSAsFnxBIOuAggdh3AKTL7pDuCyABcMb0aQP7aM4AnAbc/wHwA5D2wDHTTe56gIIOUA/4YYV2e1sg713PXdZJAuncdZMAGkAukU9OAn40O849+0ornPwT93rphWF0mgAbauUrEOthlX8Zu7P5A6kZyKCJy75hhw1Mgr9RAUvX7A3csGqZegEdniCx30c3agAAAABJRU5ErkJggg==" alt="cqhttp"></a>
  </p>
  <p align="center">
    <a href="https://python.org" title="Go to Python homepage"><img src="https://img.shields.io/badge/Python-%3E=3.10-green?logo=python&logoColor=white" alt="Made with Python"></a>
    <a href="https://pdm-project.org"><img src="https://img.shields.io/badge/PDM-Managed-purple?logo=pdm&logoColor=white" alt="PDM - Managed"></a>
    <a href="https://pypi.org/project/melobot/"><img alt="PyPI" src="https://img.shields.io/pypi/v/melobot"></a>
    <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
    <a href="https://mypy-lang.org/"><img src="https://www.mypy-lang.org/static/mypy_badge.svg" alt="Checked with mypy"></a>
  </p>
  <p>
    郑重承诺和提示：
    <strong>本项目一切开发旨在学习，请勿用于商业用途和非法用途。任何使用本项目的用户群体，有义务遵守其所在国家或地区的相关法律规定。</strong>
  </p>
</div>

<!-- start elevator-pitch -->

## 🎉 简介

MeloBot 是一个基于 Python 的 qq 机器人开发框架。其以**Onebot 标准的实现项目**作为前端，通过对来自“前端”的各种“事件”的处理，再产生“行为”，最后提交给“前端”与 qq 服务器交互，即可实现各类复杂的功能。

使用本框架的机器人项目如下：

- [MeloInf](https://github.com/aicorein/meloinf)

你可以将这些项目作为 melobot 的使用参考之一。我们也欢迎你基于 melobot 实现机器人后，向文档提出 PR，在此处展示。

## ✨ 特色

- 基于 asyncio 的高性能异步
- 支持插件交互的插件化管理
- 异步会话控制、自动的会话上下文
- 事件预检查、预匹配和预解析
- 支持 bot 生命周期 hook
- 支持多 bot 协同工作
- 丰富的接口设计

## 📦️ 安装使用

通过 `pip` 命令安装：

```shell
pip install melobot
```

或从源码构建：

本项目通过 pdm 管理，你首先需要安装 [pdm](https://pdm-project.org/latest/#installation)。

```shell
# 随后在本项目根目录：
pdm install
pdm build
```

之后可在 `.pdm-build` 目录获取本地构建，pip 本地安装即可。

提示：首次运行 pdm 需要初始化虚拟环境，可参照 pdm 文档操作。

## 🪄 版本支持

- python >= 3.10
- platform == All
- OneBot 标准 == 11

## ❤️ 致谢

MeloBot 的很多设计也是从别处借鉴而来的。虽然 MeloBot 并未直接引用这些项目的代码。

但感谢这些优秀的开源项目，它们间接启发了 MeloBot 的架构设计：

- [Flask](https://github.com/pallets/flask)
- [nonebot](https://github.com/nonebot/nonebot)
- [nonebot2](https://github.com/nonebot/nonebot2)

<!-- end elevator-pitch -->

## 💬 更多

项目文档：[MeloBot 文档](https://docs.melobot.org)
