2022-01-22 15:23:07 +08:00
|
|
|
|
"""[Quart](https://pgjones.gitlab.io/quart/index.html) 驱动适配
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
nb driver install quart
|
|
|
|
|
# 或者
|
|
|
|
|
pip install nonebot2[quart]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
:::tip 提示
|
|
|
|
|
本驱动仅支持服务端连接
|
|
|
|
|
:::
|
2021-02-06 10:46:17 +08:00
|
|
|
|
|
2022-01-22 15:23:07 +08:00
|
|
|
|
FrontMatter:
|
|
|
|
|
sidebar_position: 5
|
|
|
|
|
description: nonebot.drivers.quart 模块
|
2021-02-06 10:46:17 +08:00
|
|
|
|
"""
|
|
|
|
|
|
2021-12-30 12:11:31 +08:00
|
|
|
|
import asyncio
|
|
|
|
|
from functools import wraps
|
2023-07-17 15:56:27 +08:00
|
|
|
|
from typing_extensions import override
|
2023-07-17 15:01:21 +08:00
|
|
|
|
from typing import (
|
|
|
|
|
Any,
|
|
|
|
|
Dict,
|
|
|
|
|
List,
|
|
|
|
|
Tuple,
|
|
|
|
|
Union,
|
|
|
|
|
TypeVar,
|
|
|
|
|
Callable,
|
|
|
|
|
Optional,
|
|
|
|
|
Coroutine,
|
|
|
|
|
cast,
|
|
|
|
|
)
|
2021-02-06 10:34:52 +08:00
|
|
|
|
|
2021-06-10 21:52:20 +08:00
|
|
|
|
from pydantic import BaseSettings
|
2021-02-06 09:41:17 +08:00
|
|
|
|
|
2021-09-18 16:11:03 +08:00
|
|
|
|
from nonebot.config import Env
|
2023-08-26 11:03:24 +08:00
|
|
|
|
from nonebot.drivers import ASGIMixin
|
2021-12-30 12:11:31 +08:00
|
|
|
|
from nonebot.exception import WebSocketClosed
|
2022-02-06 17:08:11 +08:00
|
|