目录
一、在apps下新建文件夹config
二、新建配置文件app_conf.py
一、在apps下新建文件夹config
二、新建配置文件app_conf.py
from functools import lru_cache
from pydantic.v1 import BaseSettings
class AppConfig(BaseSettings):
app_name: str = "Windows10 插件"
# 开启缓存
@lru_cache
def get_app_settings():
return AppConfig()
app_settings = get_app_settings()