Files
DinQuant/backend_api_python/app/routes/health.py
T
TIANHE f43312a858 creat
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2025-12-29 03:06:49 +08:00

29 lines
583 B
Python

"""
健康检查路由
"""
from flask import Blueprint, jsonify
from datetime import datetime
health_bp = Blueprint('health', __name__)
@health_bp.route('/', methods=['GET'])
def index():
"""API 首页"""
return jsonify({
'name': 'QuantDinger Python API',
'version': '2.0.0',
'status': 'running',
'timestamp': datetime.now().isoformat()
})
@health_bp.route('/health', methods=['GET'])
def health_check():
"""健康检查"""
return jsonify({
'status': 'healthy',
'timestamp': datetime.now().isoformat()
})