为 NoneBot2 设计的娱乐系统基础设施。
核心特性
nonebot_plugin_value 是一个基于 NoneBot2 的通用经济系统插件,提供以下核心功能:
- 📈 账户系统: 各货币账户独立
- 🪙 多货币系统: 支持创建任意数量的货币类型
- 💰 原子化交易: 保证转账等操作的事务性
- 🔁 钩子系统: 支持交易前后触发自定义逻辑
- 📊 完整审计: 所有交易记录包含完整上下文信息
- 🔐 安全控制: 支持负余额限制
- 📝 批量操作: 支持批量修改用户的货币数据
- 🔍 时间范围审计日志: 从时间范围获取交易记录
- 🚀 导出数据: 支持从 Json 文件导入/导出到 Json 文件
- 🔧 依赖注入: 支持依赖注入模式调用
- ⚡️ 高性能: LRU淘汰策略应用层缓存
快速开始
安装
-
使用 nb-cli 安装:
nb plugin install nonebot-plugin-value
-
使用 uv 安装:
uv add nonebot-plugin-value
-
使用 pip 安装:
pip install nonebot-plugin-value
加载插件
使用pip/uv安装需要打开pyproject.toml
[tool.nonebot]
plugins = ["nonebot_plugin_value"]
添加依赖后,请重新启动 nonebot2
API Docs
配置项
VALUE_PRE_BUILD_CACHE = true # 是否在启动时预构建缓存
更新迁移
-
升级 nonebot_plugin_value 到最新版本
-
在机器人根目录使用
nb orm upgrade命令升级数据库
Metadata
Release files for nonebot-plugin-value 1.0.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_value-1.0.0.tar.gz | 65.5 kB | Without provenance | Details for nonebot_plugin_value-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_value-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_value-1.0.0-py3-none-any.whl |
Total release size: 125.6 kB
Release files / nonebot_plugin_value-1.0.0.tar.gz
| Download URL | nonebot_plugin_value-1.0.0.tar.gz |
|---|---|
| Size | 65.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be2acad98c8b1b88727f433225e10da8f0b459ae8ac44fd6be34896f6b1685fb
|
|
BLAKE2b-256 checksum How to use checksums |
7e584c6c1a41b635bc19e0c3c498e5393c83e025bdb35f320ad8e16dd581a0d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / nonebot_plugin_value-1.0.0-py3-none-any.whl
| Download URL | nonebot_plugin_value-1.0.0-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e36e7b34bdda945bf23dd2fa361356c52508837acdc5c16d7a60229ed529437
|
|
BLAKE2b-256 checksum How to use checksums |
79145889762f0426a0c3d9a005553a65f41052337a5325ad84d7a712721b4cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for nonebot-plugin-value 1.0.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.