Skip to main content

session 插件 orm 扩展

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_session_orm-0.2.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_session_orm-0.2.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_session_orm-0.2.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_session_orm-0.2.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.11.0 Linux/6.5.0-1025-azure

File hashes

Hashes for nonebot_plugin_session_orm-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b615df55b00bfb6c37b9e66664e7ebd69deaf921e77a6491c74c9429740414d8
MD5 a71500470c0a4051fe7e73b9931f28b6
BLAKE2b-256 5ce160d7d9f1decad38efab3059f74666b25f8aa1ab496bef737e7aedc2609ce

See more details on using hashes here.

File details

Details for the file nonebot_plugin_session_orm-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_session_orm-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab2bbc9fbf245b3e236789aabb2bef4d501dd720d74002744091503d33548ba7
MD5 72f9af92b30255c1f2c1d6a7e593031b
BLAKE2b-256 962e6f8e30055aa0c28e19df2659e325b27ea5b6c788dbc8b99591b0935cdaaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page