"""Utility Handlers.""" from http import HTTPStatus from common_apispec import doc, marshal_with from flask import Blueprint, jsonify from abacus_state import config from abacus_state.schemas.base import HealthDetailSchema base_api = Blueprint('base_api', __name__) @doc( description='Check the health of the application.', ) @marshal_with( HealthDetailSchema, code=HTTPStatus.OK, description=HTTPStatus.OK.phrase, ) @base_api.route(config.Config.HEALTH_CHECK, methods=['GET']) def health(): """Check the health of the application.""" return jsonify({'status': 'ok'})