Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application/app_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask
from flask_restplus import Api, Resource
from flask_restx import Api, Resource

# Define the application as a Flask app with the name defined by __name__ (i.e. the name of the current module)
# Most tutorials define application as "app", but I have had issues with this when it comes to deployment,
Expand All @@ -28,4 +28,4 @@ def get(self):
# Allows app to be run in debug mode
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
2 changes: 1 addition & 1 deletion application/app_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask
from flask_restplus import Api, Resource
from flask_restx import Api, Resource

# Define the application as a Flask app with the name defined by __name__ (i.e. the name of the current module)
# Most tutorials define application as "app", but I have had issues with this when it comes to deployment,
Expand Down
4 changes: 2 additions & 2 deletions application/app_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask
from flask_restplus import Api, Resource
from flask_restx import Api, Resource
import _____

# Define the application as a Flask app with the name defined by __name__ (i.e. the name of the current module)
Expand Down Expand Up @@ -48,4 +48,4 @@ def get(self, _____):
# Allows app to be run in debug mode
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
4 changes: 2 additions & 2 deletions application/app_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask, make_response
from flask_restplus import Api, Resource
from flask_restx import Api, Resource
import requests
from dicttoxml import dicttoxml

Expand Down Expand Up @@ -65,4 +65,4 @@ def get(self, genome_build, variant_description, select_transcripts):
# Allows app to be run in debug mode
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
4 changes: 2 additions & 2 deletions application/app_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask, make_response
from flask_restplus import Api, Resource, reqparse
from flask_restx import Api, Resource, reqparse
import requests
from dicttoxml import dicttoxml

Expand Down Expand Up @@ -139,4 +139,4 @@ def get(self, genome_build, variant_description, select_transcripts):
# Allows app to be run in debug mode
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
4 changes: 2 additions & 2 deletions application/app_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Import modules
from flask import Flask, make_response, request
from flask_restplus import Api, Resource, reqparse, fields, abort
from flask_restx import Api, Resource, reqparse, fields, abort
import requests
from requests.exceptions import ConnectionError
from dicttoxml import dicttoxml
Expand Down Expand Up @@ -231,4 +231,4 @@ def default_error_handler(e):
# Allows app to be run in debug mode
if __name__ == '__main__':
application.debug = True # Enable debugging mode
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
application.run(host="127.0.0.1", port=5000) # Specify a host and port fot the app
20 changes: 17 additions & 3 deletions application/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
flask==1.1.1
flask_restplus
Werkzeug==0.16.1
aniso8601==9.0.1
attrs==23.1.0
click==8.1.7
Flask
flask-restx
itsdangerous==2.1.2
Jinja2==3.1.2
jsonschema==4.19.1
jsonschema-specifications==2023.7.1
MarkupSafe==2.1.3
pytz==2023.3.post1
referencing==0.30.2
rpds-py==0.10.6
six==1.16.0
Werkzeug==2.3.3
requests
dicttoxml
4 changes: 2 additions & 2 deletions application/rest_api/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Simple rest interface for VariantValidator built using Flask Flask-RESTPlus and Swagger UI
Simple rest interface for VariantValidator built using Flask Flask-RESTX and Swagger UI
"""

# Import modules
Expand Down Expand Up @@ -46,7 +46,7 @@
Representations
- Adds a response-type into the "Response content type" drop-down menu displayed in Swagger
- When selected, the APP will return the correct response-header and content type
- The default for flask-RESTPlus is application/json
- The default for flask-RESTX is application/json

Note
- The decorators are assigned to the functions
Expand Down
4 changes: 2 additions & 2 deletions application/rest_api/endpoints/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask_restplus import Api
from flask_restx import Api

from .hello import api as ns_hello
from .name import api as ns_name
Expand All @@ -14,4 +14,4 @@

api.add_namespace(ns_hello)
api.add_namespace(ns_name)
api.add_namespace(ns_vv)
api.add_namespace(ns_vv)
2 changes: 1 addition & 1 deletion application/rest_api/endpoints/hello.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask_restplus import Namespace, Resource
from flask_restx import Namespace, Resource
from . import request_parser
from . import representations

Expand Down
2 changes: 1 addition & 1 deletion application/rest_api/endpoints/name.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask_restplus import Namespace, Resource
from flask_restx import Namespace, Resource
from . import request_parser
from . import representations

Expand Down
2 changes: 1 addition & 1 deletion application/rest_api/endpoints/request_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask_restplus import reqparse
from flask_restx import reqparse


# Create a RequestParser object to identify specific content-type requests in HTTP URLs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask_restplus import Namespace, Resource
from flask_restx import Namespace, Resource
from . import request_parser
from . import representations
import requests
Expand Down