nonebot-plugin-session-orm
为 session 提供数据库模型及存取方法
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_session_orm
- 使用 pip
pip install nonebot_plugin_session_orm
使用
from nonebot import require
require("nonebot_plugin_session_orm")
from nonebot_plugin_session import EventSession
from nonebot_plugin_session_orm import get_session_persist_id, get_session_by_persist_id
@matcher.handle()
async def handle(session: EventSession):
persist_id = await get_session_persist_id(session) # 存储 session,返回 persist_id
session_loaded = await get_session_by_persist_id(persist_id) # 通过 persist_id 获取 session
Metadata
Release files for nonebot_plugin_session_orm 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_session_orm-0.2.2.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_session_orm-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / nonebot_plugin_session_orm-0.2.2.tar.gz
| Download URL | nonebot_plugin_session_orm-0.2.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b615df55b00bfb6c37b9e66664e7ebd69deaf921e77a6491c74c9429740414d8
|
|
BLAKE2b-256 checksum How to use checksums |
5ce160d7d9f1decad38efab3059f74666b25f8aa1ab496bef737e7aedc2609ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.11.0 Linux/6.5.0-1025-azure
|
Release files / nonebot_plugin_session_orm-0.2.2-py3-none-any.whl
| Download URL | nonebot_plugin_session_orm-0.2.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab2bbc9fbf245b3e236789aabb2bef4d501dd720d74002744091503d33548ba7
|
|
BLAKE2b-256 checksum How to use checksums |
962e6f8e30055aa0c28e19df2659e325b27ea5b6c788dbc8b99591b0935cdaaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.11.0 Linux/6.5.0-1025-azure
|