
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
nonebot-plugin-localstore
Advanced tools
✨ 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
参考路径如下:
~/Library/Caches/<AppName>
~/.cache/<AppName>
(XDG default)C:\Users\<username>\AppData\Local\<AppName>\Cache
~/Library/Application Support/<AppName>
~/.local/share/<AppName>
or in $XDG_DATA_HOME, if definedC:\Documents and Settings\<username>\Application Data\<AppName>
C:\Users\<username>\AppData\Local\<AppName>
~/.config/<AppName>
C:\Documents and Settings\<username>\Local Settings\Application Data\<AppName>
C:\Users\<username>\AppData\Roaming\<AppName>
插件支持配置全局存储路径,也支持为插件单独配置存储路径。
LOCALSTORE_CACHE_DIR=/tmp/cache
LOCALSTORE_DATA_DIR=/tmp/data
LOCALSTORE_CONFIG_DIR=/tmp/config
LOCALSTORE_PLUGIN_CACHE_DIR='
{
"plugin1": "/tmp/plugin1/cache",
"plugin2:sub_plugin": "/tmp/plugin2/sub_plugin/cache"
}
'
LOCALSTORE_PLUGIN_DATA_DIR='
{
"plugin1": "/tmp/plugin1/data",
"plugin2:sub_plugin": "/tmp/plugin2/sub_plugin/data"
}
'
LOCALSTORE_PLUGIN_CONFIG_DIR='
{
"plugin1": "/tmp/plugin1/config",
"plugin2:sub_plugin": "/tmp/plugin2/sub_plugin/config"
}
'
FAQs
Local Storage Support for NoneBot2
We found that nonebot-plugin-localstore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.