PaiGram/utils/const.py
Li Chuangbo 4432de4215
🐛 修复 alembic 只在 core 和 plugins 目录查找 models
因为有可能项目根目录有其他不在 git 里管理的目录存在 models.py 文件,比如
`venv/Lib/site-packages/charset_normalizer/models.py`
2022-10-07 21:12:19 +08:00

27 lines
653 B
Python

"""常量"""
from pathlib import Path
from httpx import URL
__all__ = [
'PROJECT_ROOT', 'PLUGIN_DIR', 'RESOURCE_DIR',
'NOT_SET',
'HONEY_HOST', 'ENKA_HOST', 'AMBR_HOST', 'CELESTIA_HOST',
]
# 项目根目录
PROJECT_ROOT = Path(__file__).joinpath('../..').resolve()
# Core 目录
CORE_DIR = PROJECT_ROOT / 'core'
# 插件目录
PLUGIN_DIR = PROJECT_ROOT / 'plugins'
# 资源目录
RESOURCE_DIR = PROJECT_ROOT / 'resources'
NOT_SET = object()
HONEY_HOST = URL("https://genshin.honeyhunterworld.com/")
ENKA_HOST = URL("https://enka.network/")
AMBR_HOST = URL("https://api.ambr.top/")
CELESTIA_HOST = URL("https://www.projectcelestia.com/")