💿 安装
如果你不是插件开发者,那么此插件一般不需要额外安装和加载
pip
pip install nonebot-plugin-mongodb
pdm
pdm add nonebot-plugin-mongodb
poetry
poetry add nonebot-plugin-mongodb
conda
conda install nonebot-plugin-mongodb
在你的插件中添加对应的 require 以确保此插件在被引用前正确加载
from nonebot import require
require("nonebot_plugin_mongodb")
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的配置, 配置均为非必须项
通用配置项
| 配置项 | 必填 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
| mongo_uri | ⭕ | str | None | MongoDB 的连接 uri |
| mongo_database_name | ❌ | str | nonebot2 | 连接的数据库名 |
🎉 使用
如果你不是插件开发者,那么此部分无需阅读
参考 exmple 中的示例代码
在 nonebot 的 startup 阶段时,本插件会读取 beanie.Document 的全部子类并加载,因此开发者无需额外进行 init_beanie 即可直接使用,关于具体的操作方法可以参考 beanie 文档。
🙏 感谢
在此感谢以下开发者(项目)对本项目做出的贡献:
- nonebot-plugin-template: 项目的 README 模板
⏳ Star 趋势
Metadata
Release files for nonebot-plugin-mongodb 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_mongodb-0.1.0.tar.gz | 4.0 kB | Without provenance | Details for nonebot_plugin_mongodb-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_mongodb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_mongodb-0.1.0-py3-none-any.whl |
Total release size: 8.9 kB
Release files / nonebot_plugin_mongodb-0.1.0.tar.gz
| Download URL | nonebot_plugin_mongodb-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79b60f7bbcc2e223900c77cc8b42d76ddf0027373b42eb6bd3187d9dcf21478e
|
|
BLAKE2b-256 checksum How to use checksums |
a65e560b03a2b396b8f7eca359c2128bc92aaa0bbb82860beef10035125ef7c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / nonebot_plugin_mongodb-0.1.0-py3-none-any.whl
| Download URL | nonebot_plugin_mongodb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6afa86a80cdbc9a69855781c863a9b8809ae50ebf9deb0757ecf5923d8b3447f
|
|
BLAKE2b-256 checksum How to use checksums |
a7ea41668217dc322bf38af09a5d744d8afd46f909f9b6364d4b8cdb057d120b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for nonebot-plugin-mongodb 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.