📖 介绍
通过小米运动健康的亲友功能,查询用户的心率、睡眠、步数、体重等健康数据。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-mi-fitness --upgrade
使用 pypi 源安装
nb plugin install nonebot-plugin-mi-fitness --upgrade -i "https://pypi.org/simple"
使用清华源安装
nb plugin install nonebot-plugin-mi-fitness --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令uv
uv add nonebot-plugin-mi-fitness
安装仓库 main 分支
uv add git+https://github.com/Misty02600/nonebot-plugin-mi-fitness@main
pdm
pdm add nonebot-plugin-mi-fitness
安装仓库 main 分支
pdm add git+https://github.com/Misty02600/nonebot-plugin-mi-fitness@main
poetry
poetry add nonebot-plugin-mi-fitness
安装仓库 main 分支
poetry add git+https://github.com/Misty02600/nonebot-plugin-mi-fitness@main
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_mi_fitness"]
使用 nbr 安装(使用 uv 管理依赖可用)
nbr 是一个基于 uv 的 nb-cli,可以方便地管理 nonebot2
nbr plugin install nonebot-plugin-mi-fitness
使用 pypi 源安装
nbr plugin install nonebot-plugin-mi-fitness -i "https://pypi.org/simple"
使用清华源安装
nbr plugin install nonebot-plugin-mi-fitness -i "https://pypi.tuna.tsinghua.edu.cn/simple"
⚙️ 配置
插件使用 nonebot_plugin_localstore 储存数据和缓存,无需额外配置即可使用。
绑定数据按用户全局存储,用户完成一次绑定后,可在不同群聊和私聊中直接复用。
🎉 使用
首次使用
- 超级用户发送
小米登录,Bot 会发送二维码 - 使用小米运动健康 App 扫描二维码完成登录(5 分钟内有效)
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
小米绑定 <小米UID> |
群员 | 否 | 群聊/私聊 | 绑定小米账号,Bot 会自动发送亲友申请 |
小米解绑 |
群员 | 否 | 群聊/私聊 | 解除当前绑定 |
小米心率 |
群员 | 否 | 群聊/私聊 | 查询今日心率数据 |
小米睡眠 |
群员 | 否 | 群聊/私聊 | 查询今日睡眠数据 |
小米步数 |
群员 | 否 | 群聊/私聊 | 查询今日步数 |
小米体重 |
群员 | 否 | 群聊/私聊 | 查询最近体重记录 |
小米日报 |
群员 | 否 | 群聊/私聊 | 查询今日综合健康报告 |
小米心率周报 |
群员 | 否 | 群聊/私聊 | 查询近 7 天心率数据 |
小米睡眠周报 |
群员 | 否 | 群聊/私聊 | 查询近 7 天睡眠数据 |
小米步数周报 |
群员 | 否 | 群聊/私聊 | 查询近 7 天步数数据 |
小米登录 |
超级用户 | 否 | 私聊 | 扫码登录小米账号 |
小米帮助 |
群员 | 否 | 群聊/私聊 | 查看帮助信息 |
说明:小米绑定 为用户级绑定,绑定后可跨群聊/私聊使用;小米解绑 也会解除该用户的全局绑定。
🎨 效果图
Metadata
Release files for nonebot-plugin-mi-fitness 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_mi_fitness-0.1.0.tar.gz | 18.7 kB | Without provenance | Details for nonebot_plugin_mi_fitness-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_mi_fitness-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_mi_fitness-0.1.0-py3-none-any.whl |
Total release size: 47.0 kB
Release files / nonebot_plugin_mi_fitness-0.1.0.tar.gz
| Download URL | nonebot_plugin_mi_fitness-0.1.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6f0e01119d805ea8126b65a3115c319006c61f07b9036f624cf352140ea0353
|
|
BLAKE2b-256 checksum How to use checksums |
fba5b8177bba38a26d7dbf937333847834f16efb1f126602550424255ce44c51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nonebot_plugin_mi_fitness-0.1.0-py3-none-any.whl
| Download URL | nonebot_plugin_mi_fitness-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b12de060ec060d0bbba3961a6a07774bcf4bb275749e8b55333063988ee2f3f
|
|
BLAKE2b-256 checksum How to use checksums |
b8d5dd9882513af650f372895026a556656e75bdda7a3022e2e1b08dc630746b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for nonebot-plugin-mi-fitness 0.1.0
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.