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.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: nonebot_plugin_session_orm-0.2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1019-azure

File hashes

Hashes for nonebot_plugin_session_orm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 420e210898a3f348cebbb4ea0816bab66f3299c7b0c01e929a01967d60cc438c
MD5 637077c59f7e90369488926550601dbf
BLAKE2b-256 bf74566617f4d38daf43f673820d362863e81741a386df2d79ba40fe42f4e78c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_session_orm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0a6009803feccf4e98db483e1f9072122ddbca40df0b2d1b45741c8e5332acb
MD5 34ea06c240ab263dd44b20c0778c0785
BLAKE2b-256 377fd1e2e4a6a3b4c0f8489697ab04ed1136bc67982116c6df2ff7dfb092c381

See more details on using hashes here.

Supported by

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