Skip to main content

NoneBot2 自动状态推送

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-autopush

✨ NoneBot 插件简单描述 ✨

license pypi python

📖 介绍

这里是插件的详细介绍部分

💿 安装

使用 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_autopush-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_autopush-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for nonebot_plugin_autopush-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88b7a2c289f7b1ef259a3af930682d587dd06ccd940e9a05d5f9b48ceda9539b
MD5 155a20b630e01fcb88efaecaf6de65ae
BLAKE2b-256 c7a1d58afa634468964616761be19993f8409290e8a3255dd0c3ee9680b45918

See more details on using hashes here.

File details

Details for the file nonebot_plugin_autopush-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_autopush-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15dc0aafbbb397bf0fad307b6e5581c2bdfa402ccfbfec30aaf37f45daf5e15b
MD5 25d834be85773621094af4e61e0f5023
BLAKE2b-256 5008d1a53f604c549e31f396f86ffbb06c0eeb84c166c1e8544cf4ad77eb85fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page