[FEAT] (프로젝트 구성): 초기 프로젝트 구성

v0.1 (2025-11-13)
- Flask, Gunicorn, gevent, MariaDB, Redis, Swagger, logging 기본 구성 완료;
This commit is contained in:
2025-11-13 14:14:52 +09:00
commit 422c0638fd
19 changed files with 673 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
"""
Swagger 설정
"""
# Third-Party Library Imports
from flask import Blueprint, jsonify
from flask_restx import Api
from flask_jwt_extended.exceptions import JWTExtendedException, RevokedTokenError
import constants
# Swagger API Blueprint 및 설정
api_blueprint = Blueprint('api', __name__)
api = Api(
api_blueprint,
title='NuriQ API',
version=constants.API_VERSION,
description='NuriQ REST API 문서',
doc='/docs',
authorizations={
'Bearer': {
'type': 'apiKey',
'in': 'header',
'name': 'Authorization',
'description': 'JWT 토큰 입력 (예: Bearer <token>)'
}
},
security='Bearer',
validate=True
)
# 네임 스페이스 정의 및 API에 추가
__all__ = ['api_blueprint', 'api']