Files
FastapiAdmin/backend/app/utils/banner.py
T
zhangtao b0ae6af3b1 chore: update .gitignore and enhance docstrings across multiple files
- Added *.pyc and *.pyo to .gitignore to prevent compiled Python files from being tracked.
- Improved docstrings in various modules, providing clearer descriptions of functions, parameters, and return values to enhance code readability and maintainability.
2026-04-04 01:21:59 +08:00

19 lines
468 B
Python

from app.config.path_conf import BANNER_FILE
from app.core.logger import log
def worship(env: str) -> None:
"""
读取并打印启动 Banner(优先 `banner.txt`,并附带当前环境名)。
参数:
- env (str): 当前运行环境标识。
返回:
- None
"""
if BANNER_FILE.exists():
banner = BANNER_FILE.read_text(encoding="utf-8")
banner = f"🚀 当前运行环境: {env}\n{banner}"
log.info(banner)