2024-08-31 11:08:18 +00:00
<!DOCTYPE html>
< html lang = "zh-Hans" dir = "ltr" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
< title > liteyuki.config | 轻雪机器人< / title >
< meta name = "description" content = "一个综合性的机器人应用及管理框架" >
2024-11-09 15:53:05 +00:00
< meta name = "generator" content = "VitePress v1.5.0" >
2025-01-12 16:49:56 +00:00
< link rel = "preload stylesheet" href = "/assets/style.BVhTES01.css" as = "style" >
2024-11-09 15:53:05 +00:00
< link rel = "preload stylesheet" href = "/vp-icons.css" as = "style" >
2024-08-31 11:08:18 +00:00
2025-01-12 16:58:33 +00:00
< script type = "module" src = "/assets/app.rCcoAfOG.js" > < / script >
2024-08-31 11:08:18 +00:00
< link rel = "preload" href = "/assets/inter-roman-latin.Di8DUHzh.woff2" as = "font" type = "font/woff2" crossorigin = "" >
2025-01-12 16:58:33 +00:00
< link rel = "modulepreload" href = "/assets/chunks/theme.2w8Mz6uA.js" >
2025-01-12 16:49:56 +00:00
< link rel = "modulepreload" href = "/assets/chunks/framework.v7PlT0Wt.js" >
< link rel = "modulepreload" href = "/assets/dev_api_config.md.CQFvBqcK.lean.js" >
2024-08-31 11:08:18 +00:00
< link rel = "icon" type = "image/x-icon" href = "favicon.ico" >
< link rel = "stylesheet" href = "https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" >
< script id = "check-dark-mode" > ( ( ) => { const e = localStorage . getItem ( "vitepress-theme-appearance" ) || "auto" , a = window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ; ( ! e || e === "auto" ? a : e === "dark" ) && document . documentElement . classList . add ( "dark" ) } ) ( ) ; < / script >
< script id = "check-mac-os" > document . documentElement . classList . toggle ( "mac" , /Mac|iPhone|iPod|iPad/i . test ( navigator . platform ) ) ; < / script >
< / head >
< body >
2025-01-12 16:49:56 +00:00
< div id = "app" > < div class = "Layout" data-v-2391887b data-v-63ade785 > <!-- [ --> <!-- ] --> <!-- [ --> < span tabindex = "-1" data-v-b41cbf02 > < / span > < a href = "#VPContent" class = "VPSkipLink visually-hidden" data-v-b41cbf02 > Skip to content < / a > <!-- ] --> <!-- --> < header class = "VPNav" data-v-63ade785 data-v-e5ed4446 > < div class = "VPNavBar" data-v-e5ed4446 data-v-317c9d8e > < div class = "wrapper" data-v-317c9d8e > < div class = "container" data-v-317c9d8e > < div class = "title" data-v-317c9d8e > < div class = "VPNavBarTitle has-sidebar" data-v-317c9d8e data-v-0c3e78d8 > < a class = "title" href = "/" data-v-0c3e78d8 > <!-- [ --> <!-- ] --> <!-- [ --> <!-- [ --> <!-- [ --> < img class = "VPImage dark logo" src = "/liteyuki-dark.svg" alt = "LiteyukiBot Logo" data-v-5b34c2b4 > <!-- ] --> <!-- [ --> < img class = "VPImage light logo" src = "/liteyuki.svg" alt = "LiteyukiBot Logo" data-v-5b34c2b4 > <!-- ] --> <!-- ] --> <!-- ] --> < span data-v-0c3e78d8 > 轻雪机器人< / span > <!-- [ --> <!-- ] --> < / a > < / div > < / div > < div class = "content" data-v-317c9d8e > < div class = "content-body" data-v-317c9d8e > <!-- [ --> <!-- ] --> < div class = "VPNavBarSearch search" data-v-317c9d8e > <!-- [ --> <!-- --> < div id = "local-search" > < button type = "button" class = "DocSearch DocSearch-Button" aria-label = "打开搜索框" > < span class = "DocSearch-Button-Container" > < span class = "vp-icon DocSearch-Search-Icon" > < / span > < span class = "DocSearch-Button-Placeholder" > 搜索文档< / span > < / span > < span class = "DocSearch-Button-Keys" > < kbd class = "DocSearch-Button-Key" > < / kbd > < kbd class = "DocSearch-Button-Key" > K< / kbd > < / span > < / button > < / div > <!-- ] --> < / div > < nav aria-labelledby = "main-nav-aria-label" class = "VPNavBarMenu menu" data-v-317c9d8e data-v-44639ed0 > < span id = "main-nav-aria-label" class = "visually-hidden" data-v-44639ed0 > Main Navigation < / span > <!-- [ --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/deploy/install.html" tabindex = "0" data-v-44639ed0 data-v-8c15372d > <!-- [ --> < span data-v-8c15372d > 部署< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/usage/basic.html" tabindex = "0" data-v-44639ed0 data-v-8c15372d > <!-- [ --> < span data-v-8c15372d > 使用< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/store/resource.html" tabindex = "0" data-v-44639ed0 data-v-8c15372d > <!-- [ --> < span data-v-8c15372d > 扩展< / span > <!-- ] --> < / a > <!-- ] --> <!-- [ --> < a class = "VPLink link VPNavBarMenuLink" href = "/dev/guide.html" tabindex = "0" data-v-44639ed0 data-v-8c15372d > <!-- [ --> < span data-v-8c15372d > 开发< / span > <!-- ] --> < / a > <!-- ] --> <!-- ] --> < / nav > < div class = "VPFlyout VPNavBarTranslations translations" data-v-317c9d8e data-v-c134d1c9 data-v-4f75aef5 > < button type = "button" class = "button" aria-haspopup = "true" aria-expanded = "false" aria-label = "语言" data-v-4f75aef5 > < span class = "text" data-v-4f75aef5 > < span class = "vpi-languages option-icon" data-v-4f75aef5 > < / span > <!-- --> < span class = "vpi-chevron-down text-icon" data-v-4f75aef5 > < / span > < / span > < / button > < div class = "menu" data-v-4f75aef5 > < div class = "VPMenu" data-v-4f75aef5 data-v-dc051c19 > <!-- --> <!-- [ --> <!-- [ --> < div class = "items" data-v-c134d1c9 > < p class = "title" data-v-c134d1c9 > 简体中文< / p > <!-- [ --> < div class = "VPMenuLink" data-v-c134d1c9 data-v-3ec6a25f > < a class = "VPLink link" href = "/en/dev/api/config.html" data-v-3ec6a25f > <!-- [ --> < span data-v-3ec6a25f > English< / span > <!-- ] --> < / a > < / div > <!-- ] --> < / div > <!-- ] --> <!-- ] --> < / div > < / div > < / div > < div class = "VPNavBarAppearance appearance" data-v-317c9d8e data-v-86f775dc > < button class = "VPSwitch VPSwitchAppearance" type = "button" role = "switch" title aria-checked = "false" data-v-86f775dc data-v-d0596168 data-v-5ab7c8f3 > < span class = "check" data-v-5ab7c8f3 > < span class = "icon" data-v-5ab7c8f3 > <!-- [ --> < span class = "vpi-sun sun" data-v-d0596168 > < / span > < span class = "vpi-moon moon" data-v-d0596168 > < / span > <!-- ] --> < / span > < / span > < / button > < / div > < div class = "VPSocialLinks VPNavBarSocialLinks social-links" data-v-317c9d8e data-v-c3ba6796 data-v-7b9e441c > <!-- [ --> < a class = "VPSocialLink no-icon" href = "https://github.com/LiteyukiStudio/LiteyukiBot" aria-label = "github" target = "_blank" rel = "noopener" data-v-7b9e441c data-v-7db98690 > < span class = "vpi-social-github" > < / span > < / a > < a class = "VPSocialLink no-icon" href = "h
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > new_config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > copy.deepcopy(config)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > key, value < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.items():< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > isinstance< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (value, < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > dict< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > k, v < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > flat_config(value).items():< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > new_config[< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > key< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > .< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > k< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ] < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > v< / span > < / span >
2024-09-06 20:43:24 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > new_config< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-from-yaml-file-str-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_yaml(file_: str) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-from-yaml-file-str-dict-str-any" aria-label = "Permalink to "***func*** `load_from_yaml(file_: str) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : Load config from yaml file< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L43" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_yaml< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.debug(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loading YAML config from < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > file_< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > yaml.safe_load(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > encoding< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' utf-8' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
2024-09-06 20:43:24 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > flat_config(config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > is< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > None< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {})< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-from-json-file-str-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_json(file_: str) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-from-json-file-str-dict-str-any" aria-label = "Permalink to "***func*** `load_from_json(file_: str) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : Load config from json file< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L53" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_json< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.debug(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loading JSON config from < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > file_< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > json.load(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > encoding< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' utf-8' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
2024-09-06 20:43:24 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > flat_config(config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > is< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > None< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {})< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-from-toml-file-str-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_toml(file_: str) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-from-toml-file-str-dict-str-any" aria-label = "Permalink to "***func*** `load_from_toml(file_: str) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : Load config from toml file< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L62" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_toml< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.debug(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loading TOML config from < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > file_< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > toml.load(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (file_, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > encoding< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' utf-8' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
2024-09-06 20:43:24 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > flat_config(config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > is< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > None< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > else< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {})< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-from-files-files-str-no-warning-bool-false-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-from-files-files-str-no-warning-bool-false-dict-str-any" aria-label = "Permalink to "***func*** `load_from_files(*files: str, *, no_warning: bool = False) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : 从指定文件加载配置项,会自动识别文件格式 默认执行扁平化选项< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L71" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_files< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > files: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , no_warning: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > bool< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > False< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {}< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > files:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > os.path.exists(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .endswith((< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' .yaml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' yml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.update(load_from_yaml(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .endswith(< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' .json' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.update(load_from_json(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .endswith(< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' .toml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.update(load_from_toml(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_warning:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.warning(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Unsupported config file format: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > elif< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_warning:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.warning(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Config file not found: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
2024-09-06 20:43:24 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-configs-from-dirs-directories-str-no-waring-bool-false-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-configs-from-dirs-directories-str-no-waring-bool-false-dict-str-any" aria-label = "Permalink to "***func*** `load_configs_from_dirs(*directories: str, *, no_waring: bool = False) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : 从目录下加载配置文件,不递归 按照读取文件的优先级反向覆盖 默认执行扁平化选项< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L94" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_configs_from_dirs< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > *< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > directories: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , no_waring: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > bool< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > False< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {}< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > directory < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > directories:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > os.path.exists(directory):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > not< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_waring:< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > logger.warning(< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > f< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Directory not found: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > {< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > directory< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > }< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > )< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > continue< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > os.listdir(directory):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .endswith(< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > _SUPPORTED_CONFIG_FORMATS< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.update(load_from_files(os.path.join(directory, < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ), < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > no_warning< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_waring))< / span > < / span >
2024-10-20 13:00:41 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h3 id = "func-load-config-in-default-no-waring-bool-false-dict-str-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_config_in_default(no_waring: bool = False) -> dict[str, Any]< / code > < a class = "header-anchor" href = "#func-load-config-in-default-no-waring-bool-false-dict-str-any" aria-label = "Permalink to "***func*** `load_config_in_default(no_waring: bool = False) -> dict[str, Any]`"" > < / a > < / h3 > < p > < strong > 说明< / strong > : 从一个标准的轻雪项目加载配置文件 项目目录下的config.*和config目录下的所有配置文件 项目目录下的配置文件优先< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > no_waring: 是否关闭警告< / li > < / ul > < / blockquote > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L116" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_config_in_default< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (no_waring: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > bool< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > False< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> dict[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , Any]:< / span > < / span >
2024-08-31 11:08:18 +00:00
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > load_configs_from_dirs(< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' config' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > no_waring< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_waring)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config.update(load_from_files(< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' config.yaml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' config.toml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' config.json' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' config.yml' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , < / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > no_warning< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > no_waring))< / span > < / span >
2024-12-10 11:55:39 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > config< / span > < / span > < / code > < / pre > < / div > < / details > < h3 id = "class-loader" tabindex = "-1" > < em > < strong > class< / strong > < / em > < code > Loader< / code > < a class = "header-anchor" href = "#class-loader" aria-label = "Permalink to "***class*** `Loader`"" > < / a > < / h3 > < hr > < h4 id = "func-init-self" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > __init__(self)< / code > < a class = "header-anchor" href = "#func-init-self" aria-label = "Permalink to "***func*** `__init__(self)`"" > < / a > < / h4 > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L138" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > __init__< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > {}< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-load-from-yaml-self-fp-str-loader" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_yaml(self, fp: str) -> Loader< / code > < a class = "header-anchor" href = "#func-load-from-yaml-self-fp-str-loader" aria-label = "Permalink to "***func*** `load_from_yaml(self, fp: str) -> Loader`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 从yaml文件加载配置< / p > < p > < strong > 参数< / strong > :< / p > < blockquote > < ul > < li > fp:< / li > < / ul > < / blockquote > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L141" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_yaml< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, fp: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > with< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (fp, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > as< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config.update(yaml.safe_load(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-load-from-toml-self-fp-str-loader" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_toml(self, fp: str) -> Loader< / code > < a class = "header-anchor" href = "#func-load-from-toml-self-fp-str-loader" aria-label = "Permalink to "***func*** `load_from_toml(self, fp: str) -> Loader`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 从toml文件加载配置< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L150" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_toml< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, fp: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > with< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (fp, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > as< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config.update(toml.load(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-load-from-json-self-fp-str-loader" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_json(self, fp: str) -> Loader< / code > < a class = "header-anchor" href = "#func-load-from-json-self-fp-str-loader" aria-label = "Permalink to "***func*** `load_from_json(self, fp: str) -> Loader`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 从json文件加载配置< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L156" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_json< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, fp: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > with< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > open< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (fp, < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' r' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > as< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config.update(json.load(< / span > < span style = "--shiki-light:#E36209;--shiki-dark:#FFAB70;" > file< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ))< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-load-from-env-self-prefix-str-loader" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > load_from_env(self, prefix: str = ' ' ) -> Loader< / code > < a class = "header-anchor" href = "#func-load-from-env-self-prefix-str-loader" aria-label = "Permalink to "***func*** `load_from_env(self, prefix: str = '') -> Loader`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 从环境变量加载配置< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L162" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > load_from_env< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, prefix: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' ' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > for< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > key, value < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > in< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > os.environ.items():< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > if< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > key.startswith(prefix):< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config[key[< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > len< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (prefix):]] < / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > value< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-merge-self-loader-loader-loader" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > merge(self, loader: Loader) -> Loader< / code > < a class = "header-anchor" href = "#func-merge-self-loader-loader-loader" aria-label = "Permalink to "***func*** `merge(self, loader: Loader) -> Loader`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 合并两个Loader键值对树< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L169" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > merge< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, loader: < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> < / span > < span style = "--shiki-light:#032F62;--shiki-dark:#9ECBFF;" > ' Loader' < / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > :< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config.update(loader.config)< / span > < / span >
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < / span > < / code > < / pre > < / div > < / details > < hr > < h4 id = "func-get-self-key-str-default-any-none-any" tabindex = "-1" > < em > < strong > func< / strong > < / em > < code > get(self, key: str, default: Any = None) -> Any< / code > < a class = "header-anchor" href = "#func-get-self-key-str-default-any-none-any" aria-label = "Permalink to "***func*** `get(self, key: str, default: Any = None) -> Any`"" > < / a > < / h4 > < p > < strong > 说明< / strong > : 获取配置值< / p > < details > < summary > < b > 源代码< / b > 或 < a href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py#L174" target = "_blank" > 在GitHub上查看< / a > < / summary > < div class = "language-python vp-adaptive-theme" > < button title = "Copy Code" class = "copy" > < / button > < span class = "lang" > python< / span > < pre class = "shiki shiki-themes github-light github-dark vp-code" tabindex = "0" > < code > < span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > def< / span > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > get< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > (self, key: < / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > str< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > , default: Any< / span > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > =< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > None< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > ) -> Any:< / span > < / span >
2025-01-12 16:49:56 +00:00
< span class = "line" > < span style = "--shiki-light:#D73A49;--shiki-dark:#F97583;" > return< / span > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > self< / span > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > .config.get(key, default)< / span > < / span > < / code > < / pre > < / div > < / details > < / div > < / div > < / main > < footer class = "VPDocFooter" data-v-52574d27 data-v-75fd5d7f > <!-- [ --> <!-- ] --> < div class = "edit-info" data-v-75fd5d7f > < div class = "edit-link" data-v-75fd5d7f > < a class = "VPLink link vp-external-link-icon no-icon edit-link-button" href = "https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/config.py" target = "_blank" rel = "noreferrer" data-v-75fd5d7f > <!-- [ --> < span class = "vpi-square-pen edit-link-icon" data-v-75fd5d7f > < / span > 在 GitHub 上编辑此页<!-- ] --> < / a > < / div > <!-- --> < / div > < nav class = "prev-next" aria-labelledby = "doc-footer-aria-label" data-v-75fd5d7f > < span class = "visually-hidden" id = "doc-footer-aria-label" data-v-75fd5d7f > Pager< / span > < div class = "pager" data-v-75fd5d7f > < a class = "VPLink link pager-link prev" href = "/dev/api/comm/storage.html" data-v-75fd5d7f > <!-- [ --> < span class = "desc" data-v-75fd5d7f > 上一页< / span > < span class = "title" data-v-75fd5d7f > liteyuki.comm.storage< / span > <!-- ] --> < / a > < / div > < div class = "pager" data-v-75fd5d7f > < a class = "VPLink link pager-link next" href = "/dev/api/core/index.html" data-v-75fd5d7f > <!-- [ --> < span class = "desc" data-v-75fd5d7f > 下一页< / span > < span class = "title" data-v-75fd5d7f > liteyuki.core< / span > <!-- ] --> < / a > < / div > < / nav > < / footer > <!-- [ --> <!-- ] --> < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < / div > < footer class = "VPFooter has-sidebar" data-v-63ade785 data-v-b496b83f > < div class = "container" data-v-b496b83f > < p class = "message" data-v-b496b83f > 文档由 < a href = "https://vitepress.dev/" > VitePress< / a > 构建 | API引用由 < a href = "https://github.com/LiteyukiStudio/litedoc" > litedoc< / a > 生成< / p > < p class = "copyright" data-v-b496b83f > Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved< / p > < / div > < / footer > <!-- [ --> <!-- ] --> < / div > < / div >
2025-01-12 16:58:33 +00:00
< script > w i n d o w . _ _ V P _ H A S H _ M A P _ _ = J S O N . p a r s e ( " { \ " d e p l o y _ c o n f i g . m d \ " : \ " k G Y r T E L l \ " , \ " d e p l o y _ f a n d q . m d \ " : \ " 2 f l _ Y p j k \ " , \ " d e p l o y _ i n s t a l l . m d \ " : \ " c - f J c X z 8 \ " , \ " d e v _ a p i _ b o t _ i n d e x . m d \ " : \ " D f _ B d h e A \ " , \ " d e v _ a p i _ b o t _ l i f e s p a n . m d \ " : \ " Q w k S y d 4 _ \ " , \ " d e v _ a p i _ c o m m _ c h a n n e l . m d \ " : \ " B J 5 1 v f D Y \ " , \ " d e v _ a p i _ c o m m _ e v e n t . m d \ " : \ " B j G F y C y y \ " , \ " d e v _ a p i _ c o m m _ i n d e x . m d \ " : \ " B F F U o l 4 Q \ " , \ " d e v _ a p i _ c o m m _ s t o r a g e . m d \ " : \ " C 4 G Y M Y _ x \ " , \ " d e v _ a p i _ c o n f i g . m d \ " : \ " C Q F v B q c K \ " , \ " d e v _ a p i _ c o r e _ i n d e x . m d \ " : \ " S L q c v S 5 w \ " , \ " d e v _ a p i _ c o r e _ m a n a g e r . m d \ " : \ " C v J A O b r s \ " , \ " d e v _ a p i _ d e v _ i n d e x . m d \ " : \ " B O I X W K H c \ " , \ " d e v _ a p i _ d e v _ o b s e r v e r . m d \ " : \ " C 9 F G 6 E H y \ " , \ " d e v _ a p i _ d e v _ p l u g i n . m d \ " : \ " D a D 0 5 8 8 E \ " , \ " d e v _ a p i _ e x c e p t i o n . m d \ " : \ " D 3 Y l D - f L \ " , \ " d e v _ a p i _ i n d e x . m d \ " : \ " B M z m n G k f \ " , \ " d e v _ a p i _ l o g . m d \ " : \ " B Q C m l U G d \ " , \ " d e v _ a p i _ p l u g i n _ i n d e x . m d \ " : \ " D m A 7 S g X 7 \ " , \ " d e v _ a p i _ p l u g i n _ l o a d . m d \ " : \ " C G Z B T p K 5 \ " , \ " d e v _ a p i _ p l u g i n _ m a n a g e r . m d \ " : \ " b Q i u q Z o y \ " , \ " d e v _ a p i _ p l u g i n _ m o d e l . m d \ " : \ " D A x g z 8 G X \ " , \ " d e v _ a p i _ p l u g i n s _ i n d e x . m d \ " : \ " U p e _ W i m u \ " , \ " d e v _ a p i _ p l u g i n s _ l i t e e c h o . m d \ " : \ " D B p O 6 g R P \ " , \ " d e v _ a p i _ p l u g i n s _ p l u g i n _ l o a d e r _ i n d e x . m d \ " : \ " D K M g H A 3 A \ " , \ " d e v _ a p i _ s e s s i o n _ e v e n t . m d \ " : \ " C K m L y T 0 n \ " , \ " d e v _ a p i _ s e s s i o n _ i n d e x . m d \ " : \ " C F A L B Y Z K \ " , \ " d e v _ a p i _ s e s s i o n _ m a t c h e r . m d \ " : \ " B 5 y M v U 4 D \ " , \ " d e v _ a p i _ s e s s i o n _ m e s s a g e _ s e g m e n t s . m d \ " : \ " C R E Z 0 k M U \ " , \ " d e v _ a p i _ s e s s i o n _ m o d e l s . m d \ " : \ " C h y Q E 0 c I \ " , \ " d e v _ a p i _ s e s s i o n _ o n . m d \ " : \ " D A H Z 1 M f h \ " , \ " d e v _ a p i _ s e s s i o n _ r u l e . m d \ " : \ " D M a 6 R D E X \ " , \ " d e v _ a p i _ u t i l s . m d \ " : \ " D d x c D H 2 V \ " , \ " d e v _ b e s t _ p r a c t i c e s . m d \ " : \ " 4 f D 5 n T a f \ " , \ " d e v _ c o m m . m d \ " : \ " C 0 Q A x e a h \ " , \ " d e v _ g u i d e . m d \ " : \ " G x 0 r b r q P \ " , \ " d e v _ l y f u n c . m d \ " : \ " C Z 1 M r X w p \ " , \ " d e v _ p l u g i n . m d \ " : \ " C u 9 R F J S c \ " , \ " d e v _ r e s o u r c e . m d \ " : \ " V z 1 Q q b 9 X \ " , \ " e n _ d e p l o y _ c o n f i g . m d \ " : \ " W U i V A o W a \ " , \ " e n _ d e p l o y _ f a n d q . m d \ " : \ " D 9 - E T g 2 E \ " , \ " e n _ d e p l o y _ i n s t a l l . m d \ " : \ " B K g E v i a Q \ " , \ " e n _ d e v _ a p i _ b o t _ i n d e x . m d \ " : \ " e K U r Y X B P \ " , \ " e n _ d e v _ a p i _ b o t _ l i f e s p a n . m d \ " : \ " I G c J 9 j b _ \ " , \ " e n _ d e v _ a p i _ c o m m _ c h a n n e l . m d \ " : \ " B l i Z g U 7 O \ " , \ " e n _ d e v _ a p i _ c o m m _ e v e n t . m d \ " : \ " B f k z H d R 4 \ " , \ " e n _ d e v _ a p i _ c o m m _ i n d e x . m d \ " : \ " B e s C S 7 W V \ " , \ " e n _ d e v _ a p i _ c o m m _ s t o r a g e . m d \ " : \ " D s 5 K W d _ O \ " , \ " e n _ d e v _ a p i _ c o n f i g . m d \ " : \ " B S - U k X W I \ " , \ " e n _ d e v _ a p i _ c o r e _ i n d e x . m d \ " : \ " C X c 5 e Q I T \ " , \ " e n _ d e v _ a p i _ c o r e _ m a n a g e r . m d \ " : \ " D l L Z B 3 d 5 \ " , \ " e n _ d e v _ a p i _ d e v _ i n d e x . m d \ " : \ " C E Z e d f L v \ " , \ " e n _ d e v _ a p i _ d e v _ o b s e r v e r . m d \ " : \ " B 3 H 3 I u y c \ " , \ " e n _ d e v _ a p i _ d e v _ p l u g i n . m d \ " : \ " C q T d N 1 F N \ " , \ " e n _ d e v _ a p i _ e x c e p t i o n . m d \ " : \ " C F R R x H B G \ " , \ " e n _ d e v _ a p i _ i n d e x . m d \ " : \ " D j Q y f B I N \ " , \ " e n _ d e v _ a p i _ l o g . m d \ " : \ " W q Q q R T M 2 \ " , \ " e n _ d e v _ a p i _ p l u g i n _ i n d e x . m d \ " : \ " C 5 Q Z d P T H \ " , \ " e n _ d e v _ a p i _ p l u g i n _ l o a d . m d \ " : \ " C U V h y d Q s \ " , \ " e n _ d e v _ a p i _ p l u g i n _ m a n a g e r . m d \ " : \ " 7 E w F Z 4 R G \ " , \ " e n _ d e v _ a p i _ p l u g i n _ m o d e l . m d \ " : \ " D d v v c q B N \ " , \ " e n _ d e v _ a p i _ p l u g i n s _ i n d e x . m d \ " : \ " D 2 T i y 6 Z F \ " , \ " e n _ d e v _ a p i _ p l u g i n s _ l i t e e c h o . m d \ " : \ " B 8 C O 7 W b T \ " , \ " e n _ d e v _ a p i _ p l u g i n s _ p l u g i n _ l o a d e r _ i n d e x . m d \ " : \ " D v H 6 a j s D \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ e v e n t . m d \ " : \ " D 3 T h - L c Y \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ i n d e x . m d \ " : \ " D e X I c J 0 I \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ m a t c h e r . m d \ " : \ " d Q L m t m z a \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ m e s s a g e _ s e g m e n t s . m d \ " : \ " D s 5 U V 5 y u \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ m o d e l s . m d \ " : \ " D B Z y v 5 g t \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ o n . m d \ " : \ " C F v 3 Q 2 g 4 \ " , \ " e n _ d e v _ a p i _ s e s s i o n _ r u l e . m d \ " : \ " U N a f 1 4 G k \ " , \ " e n _ d e v _ a p i _ u t i l s . m d \ " : \ " Q H C 7 s H G v \ " , \ " e n _ d e v _ b e s t _ p r a c t i c e s . m d \ " : \ " o H V A A U p s \ " , \ " e n _ d e v _ c o m m . m d \ " : \ " D J z b E 7 u d \ " , \ " e n _ d e v _ g u i d e . m d \ " : \ " C Y F L z 8 N F \ " , \ " e n _ d e v _ l y f u n c . m d \ " : \ " C 9 5 U X H u - \ " , \ " e n _ d e v _ p l u g i n . m d \ " : \ " B S E j c g Q m \ " , \ " e n _ d e v _ r e s o u r c e . m d \ " : \ " L R O t N D t b \ " , \ " e n _ i n d e x . m d \ " : \ " w j z M j Z d d \ " , \ " e n _ s t o r e _ p l u g i n . m d \ " : \ " D y V V f n X g \ " , \ " e n _ s t o r e _ r e s o u r c e . m d \ " : \ " C l N f F p Q d \ " , \ " e n _ u s a g e _ a g r e e m e n t . m d \ " : \ " B A e U O i 9 b \ " , \ " e n _ u s a g e _ b a s i c . m d \ " : \ " b P K z N g L 6 \ " , \ " e n _ u s a g e _ e x t r a . m d \ " : \ " 0 j x E A W n x \ " , \ " i n d e x . m d \ " : \ " D i 9 X k c I d \ " , \ " s t o r e _ p l u g i n . m d \ " : \ " 2 0 B P 8 X z 5 \ " , \ " s t o r e _ r e s o u r c e . m d \ " : \ " D N 5 P 0 d r K \ " , \ " u s a g e _ a g r e e m e n t . m d \ " : \ " B X B h b x W S \ " , \ " u s a g e _ b a s i c . m d \ " : \ " B 7 e Q y 5 e g \ " , \ " u s a g e _ e x t r a . m d \ " : \ " C r Z 5 P g M V \ " } " ) ; f u n c t i o n d e s e r i a l i z e F u n c t i o n s ( r ) { r e t u r n A r r a y . i s A r r a y ( r ) ? r . m a p ( d e s e r i a l i z e F u n c t i o n s ) : t y p e o f r = = " o b j e c t " & & r ! = = n u l l ? O b j e c t . k e y s ( r ) . r e d u c e ( ( t , n ) = > ( t [ n ] = d e s e r i a l i z e F u n c t i o n s ( r [ n ] ) , t ) , { } ) : t y p e o f r = = " s t r i n g " & & r . s t a r t s W i t h ( " _ v p - f n _ " ) ? n e w F u n c t i o n ( ` r e t u r n $ { r . s l i c e ( 7 ) } ` ) ( ) : r } ; w i n d o w . _ _ V P _ S I T E _ D A T A _ _ = d e s e r i a l i z e F u n c t i o n s ( J S O N . p a r s e ( " { \ " l a n g \ " : \ " e n - U S \ " , \ " d i r \ " : \ " l t r \ " , \ " t i t l e \ " : \ " V i t e P r e s s \ " , \ " d e s c r i p t i o n \ " : \ " A V i t e P r e s s s i t e \ " , \ " b a s e \ " : \ " / \ " , \ " h e a d \ " : [ ] , \ " r o u t e r \ " : { \ " p r e f e t c h L i n k s \ " : t r u e } , \
2024-08-31 11:08:18 +00:00
< / body >
< / html >