nonebot-plugin-heweather


Namenonebot-plugin-heweather JSON
Version 0.6.4 PyPI version JSON
download
home_page
SummaryGet Heweather information and convert to pictures
upload_time2023-03-19 04:44:39
maintainer
docs_urlNone
authorkexue
requires_python>=3.8,<4.0.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nonebot-plugin-heweather

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

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

- 使用了~~自产自销的~~[nonebot-plugin-htmlrender](https://github.com/kexue-z/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
```

## APIKEY获取方式

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


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nonebot-plugin-heweather",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "kexue",
    "author_email": "x@kexue.io",
    "download_url": "https://files.pythonhosted.org/packages/ef/68/3617a4b46cecd3ffa86ceef4af1046ff22b183f7859bf32211faae34a3bf/nonebot_plugin_heweather-0.6.4.tar.gz",
    "platform": null,
    "description": "# nonebot-plugin-heweather\n\n\u83b7\u53d6\u548c\u98ce\u5929\u6c14\u4fe1\u606f\u5e76\u8f6c\u6362\u4e3a\u56fe\u7247\n\n# \u4f7f\u7528html+playwright\u6765\u6e32\u67d3\u597d\u770b\u7684\uff01\n\n- \u4f7f\u7528\u4e86~~\u81ea\u4ea7\u81ea\u9500\u7684~~[nonebot-plugin-htmlrender](https://github.com/kexue-z/nonebot-plugin-htmlrender)\n- **\u9700\u8981\u5148\u4fdd\u8bc1playwright\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u5e76\u5728\u7cfb\u7edf\uff08\u6216\u5bb9\u5668\u4e2d\uff09\u5b58\u5728\u4e2d\u6587\u5b57\u4f53**\n\n\n# \u5b89\u88c5\n\n\u76f4\u63a5\u4f7f\u7528 `pip install nonebot-plugin-heweather` \u8fdb\u884c\u5b89\u88c5\n\n\u5728 `bot.py` \u4e2d \u5199\u5165 `nonebot.load_plugin(\"nonebot_plugin_heweather\")`\n\n# \u6307\u4ee4\n\n`\u5929\u6c14+\u5730\u533a` \u6216 `\u5730\u533a+\u5929\u6c14`  \n\u4f8b\u5982\uff1a`\u4e0a\u6d77\u5929\u6c14` \u6216 `\u5929\u6c14\u5e7f\u5dde`\n\n# \u914d\u7f6e\n\n## apikey \u5fc5\u987b\u914d\u7f6e \u73af\u5883\u914d\u7f6e\n\n```\nQWEATHER_APIKEY = xxx\n```\n\n## api\u7c7b\u578b \u5fc5\u987b\u914d\u7f6e \u73af\u5883\u914d\u7f6e\n\n0 = \u666e\u901a\u7248(3\u5929\u5929\u6c14\u9884\u62a5)\n1 = \u4e2a\u4eba\u5f00\u53d1\u7248(7\u5929\u5929\u6c14\u9884\u62a5)\n2 = \u5546\u4e1a\u7248 (7\u5929\u5929\u6c14\u9884\u62a5)\n\n\n```\nQWEATHER_APITYPE = 0\n```\n\n## APIKEY\u83b7\u53d6\u65b9\u5f0f\n\n**1\u3001\u6ce8\u518c\u548c\u98ce\u5929\u6c14\u8d26\u53f7**  \n\u8fdb\u5165\u5b98\u7f51\u6ce8\u518c[https://id.qweather.com/#/login](https://id.qweather.com/#/login)  \n**2\u3001\u8fdb\u5165\u63a7\u5236\u53f0**  \n\u767b\u5f55\u540e\uff0c\u70b9\u51fb \u201c\u548c\u98ce\u5929\u6c14\u5f00\u53d1\u8005\u63a7\u5236\u53f0\u201d  \n**3\u3001\u521b\u5efa\u9879\u76ee**  \n\u70b9\u51fb\u63a7\u5236\u53f0\u5de6\u4fa7 \u201c\u9879\u76ee\u7ba1\u7406\u201d\uff0c\u7136\u540e\u70b9\u51fb \u201c\u521b\u5efa\u9879\u76ee\u201d\uff0c\u6839\u636e\u63d0\u793a\u81ea\u884c\u586b\u5199  \n\u201c\u9009\u62e9\u8ba2\u9605\u201d -> \u201c\u514d\u8d39\u8ba2\u9605\u201d\uff0c\u201c\u8bbe\u7f6eKEY\u201d -> \u201cWeb API\u201d\uff0c\u90fd\u586b\u597d\u540e\u201c\u521b\u5efa\u201d  \n**4\u3001\u83b7\u53d6key\u5e76\u914d\u7f6e.env.xx**  \n\u8fd4\u56de \u201c\u9879\u76ee\u7ba1\u7406\u201d\uff0c\u53ef\u4ee5\u770b\u5230\u521b\u5efa\u7684\u9879\u76ee\uff0c\u70b9\u51fbKEY\u4e0b\u9762\u7684 \u201c\u67e5\u770b\u201d\uff0c\u590d\u5236KEY\u5230\u4f60\u7684.env.xx\u5373\u53ef\u3002  \n \n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Get Heweather information and convert to pictures",
    "version": "0.6.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62b5b90b075ae4dd869ce5da1f3b0578cf6a4669cd9d4726acb74af856460f7a",
                "md5": "5a864fcbaf5013cd1ee5e7fcf7bc30f4",
                "sha256": "3fbcdc64d0bd9fd068248ad30fb2ea638db8225f3a04c9beb821e723d8a3a35c"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_heweather-0.6.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a864fcbaf5013cd1ee5e7fcf7bc30f4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0.0",
            "size": 92904,
            "upload_time": "2023-03-19T04:44:37",
            "upload_time_iso_8601": "2023-03-19T04:44:37.631507Z",
            "url": "https://files.pythonhosted.org/packages/62/b5/b90b075ae4dd869ce5da1f3b0578cf6a4669cd9d4726acb74af856460f7a/nonebot_plugin_heweather-0.6.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef683617a4b46cecd3ffa86ceef4af1046ff22b183f7859bf32211faae34a3bf",
                "md5": "09e1ca30622e0228549064614bab08f2",
                "sha256": "31adce40960ead97d37e2fda0f4cc6a13a431dc409cf973da881aef6835d1aac"
            },
            "downloads": -1,
            "filename": "nonebot_plugin_heweather-0.6.4.tar.gz",
            "has_sig": false,
            "md5_digest": "09e1ca30622e0228549064614bab08f2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0.0",
            "size": 92928,
            "upload_time": "2023-03-19T04:44:39",
            "upload_time_iso_8601": "2023-03-19T04:44:39.491949Z",
            "url": "https://files.pythonhosted.org/packages/ef/68/3617a4b46cecd3ffa86ceef4af1046ff22b183f7859bf32211faae34a3bf/nonebot_plugin_heweather-0.6.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-19 04:44:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "nonebot-plugin-heweather"
}
        
Elapsed time: 0.10671s