Local Storage Support for NoneBot2
Project description
NoneBot Plugin LocalStore
✨ NoneBot 本地存储插件 ✨
使用方式
加载插件后使用 require
声明插件依赖,直接使用 localstore
插件提供的函数即可。
from nonebot import require
require("nonebot_plugin_localstore")
import nonebot_plugin_localstore as store
plugin_cache_dir = store.get_cache_dir("plugin_name")
plugin_cache_file = store.get_cache_file("plugin_name", "filename")
plugin_config_dir = store.get_config_dir("plugin_name", "filename")
plugin_config_file = store.get_config_file("plugin_name", "filename")
plugin_data_dir = store.get_data_dir("plugin_name")
plugin_data_file = store.get_data_file("plugin_name", "filename")
存储路径
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
Close
Hashes for nonebot-plugin-localstore-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8a922c834440604bc10b3a7661aa1dcc00a92d36ea44096fd391f45a4c7b19a |
|
MD5 | cf56171ddcad2a586d2ff2927216c07a |
|
BLAKE2b-256 | 05fdc73512f9312fcf9f2f2cbad63856dbed5c0508e457f92416ae82dee71bc1 |
Close
Hashes for nonebot_plugin_localstore-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90cd37a878c75f7fd40a142ee3ddaae29656605c7b411095ca7252076ba40df3 |
|
MD5 | 1aa304b00045f343e38d31e237586f62 |
|
BLAKE2b-256 | 48ba080f8abcfd3bb5cf5c922612f6f460e58ede0d0090986f83538e9cfbb78c |