Skip to main content

Economy API for NoneBot2

Project description

value Logo

EconomyValue

基于SQLAlchemy长期存储的新一代经济API

PyPI Version Python Version NoneBot Version License QQ Group

核心特性

nonebot_plugin_value 是一个基于 NoneBot2 的通用经济系统插件,提供以下核心功能:

  • 📈 账户系统:各货币账户独立
  • 🪙 多货币系统:支持创建任意数量的货币类型
  • 💰 原子化交易:保证转账等操作的事务性
  • 🔁 钩子系统:支持交易前后触发自定义逻辑
  • 📊 完整审计:所有交易记录包含完整上下文信息
  • 🔐 安全控制:支持负余额限制
  • 📝 批量操作:支持批量修改用户的货币数据
  • 🔍 时间范围审计日志:从时间范围获取交易记录
  • 🚀 导出数据:支持从Json文件导入,导出到Json文件
  • 🛠 CLI指令:在nb-cli可执行的维护操作指令

快速开始

安装

  • 使用 uv 安装:

    uv add nonebot-plugin-value
    
  • 使用 pip 安装:

    pip install nonebot-plugin-value
    

加载插件

打开pyproject.toml

[tool.nonebot]
plugins = ["nonebot_plugin_value"]

添加依赖后,请重新启动 nonebot2

API Docs

更新迁移

  1. 升级 nonebot_plugin_value 到最新版本

  2. 生成并运行迁移脚本((如果 Bot 根目录下没有迁移脚本目录,请使用nb orm init来初始化。)在 bot 根目录使用nb orm revisonnb orm upgrade进行迁移)

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_value-0.1.0.tar.gz (55.7 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_value-0.1.0-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_value-0.1.0.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_value-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3de7820bf423184ad19d3b862ee725b3ee4214b26cd2809667d86380fc66b517
MD5 79d88571853e37b93adb96420e6d1b50
BLAKE2b-256 7f2f2571312ec931552a62055e756bddb369a530f7bb61e4ddcb7813c1540f9e

See more details on using hashes here.

File details

Details for the file nonebot_plugin_value-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_value-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bfee7e7e3a7446c3be68653b144d9915a23db44a0bfcc13432202c2a4a79572
MD5 7b0dcb1e6fc57ede2635505269928071
BLAKE2b-256 2d0f19b85b58884ffc34cd52da59040157e8e2babe053957df0bc9c0134856fc

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