detect-gui/core/config.py

17 lines
454 B
Python
Raw Normal View History

2024-11-21 11:39:52 +08:00
import os
from dynaconf import Dynaconf
current_file_dir = os.path.dirname(os.path.abspath(__file__))
# 设置环境变量
os.environ['ENV_FOR_DYNACONF'] = 'dev'
settings = Dynaconf(
envvar_prefix="DYNACONF",
settings_files=[
os.path.join(current_file_dir, '../config/app.toml'),
os.path.join(current_file_dir, '../config/dev.toml'),
os.path.join(current_file_dir, '../config/prod.toml')
],
environments=True,
)