Get the MRE api working #1

Merged
chris merged 50 commits from add_mre_api into main 2025-04-06 23:58:50 +00:00
4 changed files with 21 additions and 4 deletions
Showing only changes of commit 1d5016c176 - Show all commits

View File

@ -1,4 +1,3 @@
from flask_restx import Namespace from flask import Blueprint
namespace = Namespace('mre', blueprint = Blueprint('mre', __name__)
description='Endpoints for MRE calculations')

View File

@ -0,0 +1,6 @@
from flask_restx import Namespace
namespace = Namespace(
'mre',
description='API endpoints for MRE calculations.'
)

View File

@ -1,6 +1,6 @@
from flask import Flask from flask import Flask
import os import os
from app.MRE import mre_blueprint from app.MRE import blueprint as mre_blueprint
from .api import blueprint as api_blueprint from .api import blueprint as api_blueprint
from logging import Logger, Formatter, getLogger, DEBUG, INFO, FileHandler from logging import Logger, Formatter, getLogger, DEBUG, INFO, FileHandler

12
app/api.py Normal file
View File

@ -0,0 +1,12 @@
from flask_restx import Api
from flask import Blueprint
from .MRE.api import namespace as mre_namespace
blueprint = Blueprint('api', __name__)
api = Api(
blueprint,
doc='/doc/',
title='Quarter API documentatoin'
)
api.add_namespace(mre_namespace, '/mre')