semvec/pypi-packages huggingface dataset:
nonebot-plugin-mcqq-server 1.1.4
采用本地读取 log 信息的方法的 Minecraft Server 消息互通插件。
Requires Python: <4.0,>=3.10

<div align="center">

<a href="https://v2.nonebot.dev/store">
  <img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo">
</a>

<p>
  <img src="https://raw.githubusercontent.com/A-kirami/nonebot-plugin-template/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText">
</p>

# Minecraft Server 消息互通

Minecraft Server 消息互通，采用本地读取 log 信息的方法。

[![python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![license](https://img.shields.io/github/license/KarisAya/nonebot_plugin_mcqq_server.svg)](./LICENSE)
[![pypi](https://img.shields.io/pypi/v/nonebot_plugin_mcqq_server.svg)](https://pypi.python.org/pypi/nonebot_plugin_mcqq_server)
[![pypi download](https://img.shields.io/pypi/dm/nonebot_plugin_mcqq_server)](https://pypi.python.org/pypi/nonebot_plugin_mcqq_server)
<br />

[![机器人 bug 研究中心](https://img.shields.io/badge/QQ%E7%BE%A4-744751179-maroon?)](https://qm.qq.com/q/3vpD9Ypb0c)

</div>

# 安装

```bash
nb plugin install nonebot-plugin-mcqq-server
```

# Bot 配置与服务端配置

1. Bot 配置文件

在 nb 项目路径下找到 `.env.prod` 文件，添加以下内容

```dotenv
# Minecraft Server 消息互通
MCRCON_PASSWORD = "A"
MCRCON_PORT = 25575
MCS_LOG_PATH = "D:/MinecraftServer/logs/latest.log"
# 功能配置
MCS_GROUP_CMD = []
MCS_GROUP_LIST = ["724024810"] # QQ群
MCS_MC_CMD = []
MCS_MC_BROADCAST = '{"all":["724024810"]}'。
```

配置说明：

- `MCRCON_PASSWORD` rcon 密码
- `MCRCON_PORT` rcon 端口
- `MCS_LOG_PATH` 服务端日志文件路径，精确到日志文件，为空则关闭广播。
- `MCS_GROUP_CMD` 群转发触发命令，如果为空则将群聊消息全部转发至服务器。
- `MCS_GROUP_LIST` 转发至服务器的群组列表
- `MCS_MC_CMD` 服务器广播命令，如果为空则将服务器消息全部转发至群组。
- `MCS_MC_BROADCAST` 广播分配配置，键是 Bot ID, 值是该 Bot 负责广播的群组列表

_特别注意：当 `MCS_MC_BROADCAST` 的键为 `all` 时为单 bot 模式，此时插件会用第一个 bot 进行广播。如果键设置为 `all` 不可以设置其他 bot_

2. 服务端配置文件

在 MC 服务端文件的 `server.properties` 中开启 Rcon

```properties
# rcon
enable-rcon=true
rcon.password=1 # 设置rcon密码，与mcrcon_password一致。
rcon.port=25575 # 设置rcon端口，与mcrcon_port一致。
```

# 使用方法

在群内或游戏中发送信息即可使用。

超级管理员可使用 `mcs指令` 向服务器发送控制台指令。

例如 `mcs指令 weather rain` 相当于输入控制台指令 `/weather rain`

# 致谢

- [MCQQ](https://github.com/17TheWord/nonebot-plugin-mcqq)
aioduck 2025.9.15
Python asyncio bindings for DuckDB
Requires Python: <4.0,>=3.11

# Python asyncio bindings for DuckDB

aioduck provides a friendly, async interface to DuckDB databases.

## Usage

It replicates the standard `duckdb` module, but with async versions of all the standard connection and cursor methods, 
plus context managers for automatically closing connections and cursors:

``` python
from aioduck import AsyncConnection

async with AsyncConnection(...) as conn:
    await conn.execute("INSERT INTO some_table ...")
    await conn.commit()

    async with conn.cursor() as cursor:
        await cursor.execute("SELECT * FROM some_table")
        async for row in cursor:
            ...
```

It can also be used in the traditional, procedural manner:

``` python
from aioduck import AsyncConnection

db = await AsyncConnection(...)
cursor = db.cursor()
await db.execute('SELECT * FROM some_table')
row = await cursor.fetchone()
rows = await cursor.fetchall()
await cursor.close()
await db.close()
```

## Install

aioduck is compatible with Python 3.11 and newer. You can install it from PyPI:

``` console
$ pip install aioduck
```

## Details

aioduck allows interaction with DuckDB databases on the main AsyncIO event loop without blocking execution of other coroutines while waiting for queries or data fetches. 
It does this by using an agent. This agent executes all actions within a shared request queue to prevent overlapping actions.

Connection objects are proxies to the real connections through the agent.
Cursors are similarly proxies to the real cursors, and provide async iterators to query results.

## License

aioduck is licensed under the MIT license. 
I am providing code in this repository to you under an open source license. 
This is my personal repository; the license you receive to my code is from me and not from my employer. 
See the [LICENSE](https://github.com/cnfairydream/aioduck/blob/main/LICENSE) file for details.
tortoise-orm-extra-duckdb 2025.9.15
Tortoise ORM backend for DuckDB
Requires Python: <4.0,>=3.11

# Tortoise ORM backend for DuckDB

This integration allows you to use asyncio duckdb APIs with Tortoise ORM.

## Install

tortoise-orm-extra-duckdb is compatible with Python 3.11 and newer. You can install it from PyPI:

``` console
$ pip install tortoise-orm-extra-duckdb
```

## Usage

It is very simple to use. You only need to add two lines of code to the original project and switch the database to
duckdb.

``` python
import asyncio

from tortoise import Tortoise, fields, run_async
from tortoise.models import Model
+ from tortoise.patch import monkey_patch


class Event(Model):
    id = fields.IntField(primary_key=True)
    name = fields.TextField(description="Name of the event that corresponds to an action")
    datetime = fields.DatetimeField(
        null=True, description="Datetime of when the event was generated"
    )

    class Meta:
        table = "event"
        table_description = "This table contains a list of all the example events"

    def __str__(self):
        return self.name


async def main():
~   await Tortoise.init(db_url="duckdb://:memory:", modules={"models": ["__main__"]})
    await Tortoise.generate_schemas()

    event = await Event.create(id=1, name="Test")
    await Event.filter(id=event.id).update(name="Updated name")

    print(await Event.filter(name="Updated name").first())

    await Event(id=2, name="Test 2").save()
    print(await Event.all().values_list("id", flat=True))
    print(await Event.all().values("id", "name"))


if __name__ == "__main__":
+   monkey_patch()
    asyncio.run(main())
```

## License

tortoise-orm-extra-duckdb is licensed under the MIT license.
I am providing code in this repository to you under an open source license.
This is my personal repository; the license you receive to my code is from me and not from my employer.
See the [LICENSE](https://github.com/cnfairydream/tortoise-orm-extra-duckdb/blob/main/LICENSE) file for details.