Skip to main content
NoneBotPluginLogo

nonebot_plugin_smallapi

✨ 高效,快速的小小WEBAPI调用插件! ✨

GitHub stars GitHub issues GitHub forks license pypi python

🙏 致谢

感谢大佬lgc2333提供借鉴源代码 借鉴的代码

📖 前言及介绍

PS: 这是我第一次写(划掉,是借鉴去ctrlcv!详见最下方致谢)插件,没有多少经验,写的也不规范,如果介意可以不用,望多多关照~(如果可以,给个star)
不要喷我~这个插件大佬5分钟就能搓出来……我是为了那些想写插件但是不会写的人群而写的这个插件,你可以随便借鉴,没什么精髓,只要标明致谢就好了~(╥╯^╰╥)
这个插件主要功能是调用WEBAPI链接获取数据处理后发到QQ里面的,目前统一使用json调用并解析,有问题记得issues!

🔧 开发环境

Nonebot2:2.0.0rc4
python:3.11.3
操作系统:Linux(Windows兼容性问题不大)
编辑器:VS Code

💿 安装

1. nb-cli安装(推荐)

在你bot工程的文件夹下,运行cmd/shell(运行路径要对啊),执行nb命令安装插件,插件配置会自动添加至配置文件

nb plugin install nonebot_plugin_smallapi

2. pip安装

pip install nonebot_plugin_smallapi

如果是默认nb-cli创建的nonebot2的话,在bot路径pyproject.toml的[tool.nonebot.plugins]中添加一行即可
pyproject.toml配置例如:

[tool.nonebot.plugins]
......
nonebot-plugin-smallapi = ["nonebot_plugin_smallapi"]

3. 本地安装(不推荐)

访问项目Pypi主页下载.tar.gz文件 也可以直接下载压缩包到插件目录解压,然后同样提取nonebot_plugin_smallapi至上一级目录。
目录结构: 你的bot/src/plugins/nonebot_plugin_smallapi/__init__.py
不再提供github仓库资源版本(懒)

更新版本

nb plugin update nonebot_plugin_smallapi

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
smallapi_token 是 无 故梦API的调用KEY

例如.env.prod :

...
smallapi_token="qwer1234114514"
#不可以填纯数字哈,不可以没有""哈,除非你闲的没事a.e
#密钥获取网址: https://www.gmya.net/api
#没有你就填
smallapi_token=""
#这是必填配置项!!!  

不填写也能用,但是有调用限制哈!

🎉 功能

  1. 超级多看下面的吧

👉 命令

PS: 请查看你env中起始符的配置(默认/)

  1. 小小图片
  2. 小小文本
  3. 小小网站

小小图片

命令结构:(/)小小图片
例如:小小图片

小小文本

命令结构:(/)小小文本
例如:小小文本

小小网站

命令结构:(/)小小网站
例如:小小网站

⚙ 拓展

还没有呢~

📝 更新日志

展开/收起

2.0.1

  • 修依赖xN

2.0.0

  • 大版本更新

1.1.6/1.1.7

  • None

1.1.5

  • 调用地址更新
  • 增加故梦的appkey调用方法
  • 此版本未修复部分功能的兼容性问题,如需使用请提交Issus!

1.1.0

  • 站点代码重写更新

1.0.7

  • 优化更新

1.0.6

  • 维护更新,蟒蛇(Python)版本要求最低改为3.10

1.0.5

  • 修复ip查询中的致命语法错误

1.0.4

  • 更换稳定API, 修复部分Bug

1.0.3

  • 梅开三度,终于修好了依赖

1.0.2

  • 梅开二度.

1.0.1

  • 修复依赖问题

1.0.0

  • 插件初次发布

致谢

Metadata

Release files for nonebot-plugin-smallapi 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-smallapi 2.0.1
File Size Uploaded Provenance
nonebot_plugin_smallapi-2.0.1.tar.gz 20.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-smallapi 2.0.1
File Interpreter ABI Platform
nonebot_plugin_smallapi-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.3 kB

Release files / nonebot_plugin_smallapi-2.0.1.tar.gz

Download URL nonebot_plugin_smallapi-2.0.1.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8531f5eae12a3e2c06678498c77333e707defdfa124141480af8b3299d8858bc
BLAKE2b-256 checksum
How to use checksums
130989e8ea1a6fe20fe58e08563b059f4d5c7056cd86fed77cf8d9ee135fed4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / nonebot_plugin_smallapi-2.0.1-py3-none-any.whl

Download URL nonebot_plugin_smallapi-2.0.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abed85439ed8649ea078616fd69afabb2346133b605657cc9bcc4214a7d4a952
BLAKE2b-256 checksum
How to use checksums
3e360d79ccd9357d27e6e981b2215814c1a3d7b4619040b3e8e91a1ab0d230ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for nonebot-plugin-smallapi 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page