Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nonebot-plugin-heweather

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nonebot-plugin-heweather

Get Heweather information and convert to pictures

  • 0.8.2
  • PyPI
  • Socket score

Maintainers
2

NoneBotPluginLogo

nonebot-plugin-heweather

✨ 获取和风天气信息并转换为图片 ✨

license pypi python

使用 html+playwright 来渲染好看的!

  • 使用了自产自销的nonebot-plugin-htmlrender
  • 需要先保证 playwright 可以正常运行并在系统(或容器中)存在中文字体

安装

直接使用 pip install nonebot-plugin-heweather 进行安装

bot.py 中 写入 nonebot.load_plugin("nonebot_plugin_heweather")

指令

天气+地区地区+天气
例如:上海天气天气广州

配置

apikey 必须配置 环境配置

QWEATHER_APIKEY = xxx

api 类型 必须配置 环境配置

0 = 普通版 免费订阅 (3 天天气预报)
1 = 个人开发版 标准订阅 (7 天天气预报)
2 = 商业版 (7 天天气预报)

QWEATHER_APITYPE = 0

逐小时类型 可选配置 环境变量

1 = 未来12小时 (默认值)
2 = 未来24小时

QWEATHER_HOURLYTYPE = 1

APIKEY 获取方式

1、注册和风天气账号
进入官网注册https://id.qweather.com/#/login
2、进入控制台
登录后,点击 “和风天气开发者控制台”
3、创建项目
点击控制台左侧 “项目管理”,然后点击 “创建项目”,根据提示自行填写
“选择订阅” -> “免费订阅”,“设置 KEY” -> “Web API”,都填好后“创建”
4、获取 key 并配置.env.xx
返回 “项目管理”,可以看到创建的项目,点击 KEY 下面的 “查看”,复制 KEY 到你的.env.xx 即可。

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc