Commit 4207f24f authored by David Mendez's avatar David Mendez
Browse files

Start to use flask_restx

parent 299eed44
......@@ -4,7 +4,7 @@ Entry file for the delayed jobs app
import logging
from flask import Flask, Blueprint
from flask_restplus import Api
from flask_restx import Api
from app.namespaces.admin_auth.admin_auth_controller import API as job_admin_namespace
from app.namespaces.job_status.job_status_controller import API as job_status_namespace
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with performing admin tasks
"""
from flask import request, make_response, jsonify
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.authorisation import token_generator
from app.config import verify_secret
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with recording the downloads
"""
from flask import abort, request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_statistics import record_statistics_service
from app.authorisation.decorators import token_required_for_job_id
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with recording the search events
"""
from flask import abort, request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_statistics import record_statistics_service
from app.authorisation.decorators import token_required_for_job_id
......
......@@ -3,7 +3,7 @@ Module that describes and handles the requests concerned with the job status
"""
# pylint: disable=W0622,C0103, R0201
from flask import abort, request
from flask_restplus import Namespace, Resource, fields, reqparse
from flask_restx import Namespace, Resource, fields, reqparse
import werkzeug
from app.namespaces.models import delayed_job_models
......
"""
Module with shared marshalls
"""
from flask_restplus import Namespace, fields
from flask_restx import Namespace, fields
BASE_SUBMISSION_RESPONSE = Namespace('base').model('Status', {
'id': fields.String(required=True, description='The job identifier')
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with the blast search submission
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
from app.namespaces.job_submission import job_submission_service
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with the connectivity search
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with the downloads
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with the similarity search
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests concerned with the substructure search
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
......
......@@ -2,7 +2,7 @@
Module that describes and handles the requests to submit a test job
"""
from flask import request
from flask_restplus import Namespace, Resource, fields
from flask_restx import Namespace, Resource, fields
from app.namespaces.job_submission.shared_marshalls import BASE_SUBMISSION_RESPONSE
from app.namespaces.models import delayed_job_models
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment