NoneBot2 自动状态推送
Project description
📖 介绍
这里是插件的详细介绍部分
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-autopush
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-autopush
pdm
pdm add nonebot-plugin-autopush
poetry
poetry add nonebot-plugin-autopush
conda
conda install nonebot-plugin-autopush
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_autopush"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
AUTOPUSH_SERVERS |
list[Union[str, ServerConfig]] |
是 | 无 | Server 列表 |
AUTOPUSH_PROXY |
Optional[str] |
否 | None |
请求 URL 时使用的代理 |
AUTOPUSH_SUCCESS_CODE |
list[int] |
否 | [200, 204] |
推送成功时的状态码 |
AUTOPUSH_PUSH_CRON |
dict[str, str] |
否 | {"minute": "*"} |
推送间隔(Apscheduler 任务参数) |
ServerConfig
class ServerConfig(BaseModel):
url: str
headers: dict[str, str] = {}
method: str = "GET"
data: Optional[str] = None
🎉 使用
无指令和效果图
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
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 nonebot_plugin_autopush-0.1.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_autopush-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88b7a2c289f7b1ef259a3af930682d587dd06ccd940e9a05d5f9b48ceda9539b
|
|
| MD5 |
155a20b630e01fcb88efaecaf6de65ae
|
|
| BLAKE2b-256 |
c7a1d58afa634468964616761be19993f8409290e8a3255dd0c3ee9680b45918
|
File details
Details for the file nonebot_plugin_autopush-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_autopush-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15dc0aafbbb397bf0fad307b6e5581c2bdfa402ccfbfec30aaf37f45daf5e15b
|
|
| MD5 |
25d834be85773621094af4e61e0f5023
|
|
| BLAKE2b-256 |
5008d1a53f604c549e31f396f86ffbb06c0eeb84c166c1e8544cf4ad77eb85fd
|