Local Storage Support for NoneBot2
Project description
NoneBot Plugin LocalStore
✨ NoneBot 本地数据存储插件 ✨
使用方式
加载插件后使用 require
声明插件依赖,直接使用 localstore
插件提供的函数即可。
from pathlib import Path
from nonebot import require
require("nonebot_plugin_localstore")
import nonebot_plugin_localstore as store
plugin_cache_dir: Path = store.get_plugin_cache_dir()
plugin_cache_file: Path = store.get_plugin_cache_file("filename")
plugin_config_dir: Path = store.get_plugin_config_dir()
plugin_config_file: Path = store.get_plugin_config_file("filename")
plugin_data_dir: Path = store.get_plugin_data_dir()
plugin_data_file: Path = store.get_plugin_data_file("filename")
存储路径
在项目安装插件后,可以使用 nb-cli
查看具体的存储路径:
nb localstore
参考路径如下:
cache path
- macOS:
~/Library/Caches/<AppName>
- Unix:
~/.cache/<AppName>
(XDG default) - Windows:
C:\Users\<username>\AppData\Local\<AppName>\Cache
data path
- macOS:
~/Library/Application Support/<AppName>
- Unix:
~/.local/share/<AppName>
or in $XDG_DATA_HOME, if defined - Win XP (not roaming):
C:\Documents and Settings\<username>\Application Data\<AppName>
- Win 7 (not roaming):
C:\Users\<username>\AppData\Local\<AppName>
config path
- macOS: same as user_data_dir
- Unix:
~/.config/<AppName>
- Win XP (roaming):
C:\Documents and Settings\<username>\Local Settings\Application Data\<AppName>
- Win 7 (roaming):
C:\Users\<username>\AppData\Roaming\<AppName>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nonebot_plugin_localstore-0.7.2.tar.gz
.
File metadata
- Download URL: nonebot_plugin_localstore-0.7.2.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ae717d2705f3d77ea95898c3c48fa842fd4180c3c3a9fd4c5008b8a8a7c964 |
|
MD5 | 5606b834ea213bcb47f32a9bd5852f74 |
|
BLAKE2b-256 | 9f38c7ad15cec58aeed9ccbb0fd673d5bc9d62bed4cd9c2fa19e31b37329bfd8 |
Provenance
The following attestation bundles were made for nonebot_plugin_localstore-0.7.2.tar.gz
:
Publisher:
release.yml
on nonebot/plugin-localstore
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nonebot_plugin_localstore-0.7.2.tar.gz
- Subject digest:
97ae717d2705f3d77ea95898c3c48fa842fd4180c3c3a9fd4c5008b8a8a7c964
- Sigstore transparency entry: 149353914
- Sigstore integration time:
- Predicate type:
File details
Details for the file nonebot_plugin_localstore-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: nonebot_plugin_localstore-0.7.2-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b86833c8f743d9deda86648307e658e79552067f1583c1a8b9eaf75a43ee0b65 |
|
MD5 | 0f1ff662c815f3efb55d4b62f3c70e19 |
|
BLAKE2b-256 | d50c8a0aabb21c726f573107d8308fd74242043f67701429d0b88126fe67586d |
Provenance
The following attestation bundles were made for nonebot_plugin_localstore-0.7.2-py3-none-any.whl
:
Publisher:
release.yml
on nonebot/plugin-localstore
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
nonebot_plugin_localstore-0.7.2-py3-none-any.whl
- Subject digest:
b86833c8f743d9deda86648307e658e79552067f1583c1a8b9eaf75a43ee0b65
- Sigstore transparency entry: 149353915
- Sigstore integration time:
- Predicate type: