Moved API views up a level
This commit is contained in:
parent
e76dee2383
commit
bb9bb77536
14 changed files with 15 additions and 16 deletions
|
|
@ -1,3 +1,3 @@
|
|||
__all__ = ["utilities"]
|
||||
__all__ = ["utilities", "views"]
|
||||
|
||||
from . import utilities
|
||||
from . import utilities, views
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ api_microscope.camera.images = build_captures_from_exif(
|
|||
|
||||
logging.debug("Microscope successfully attached!")
|
||||
|
||||
|
||||
# Generate API URI based on version from filename
|
||||
def uri(suffix, api_version, base=None):
|
||||
if not base:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from openflexure_microscope.api.utilities import gen, JsonResponse
|
||||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
|
||||
from flask import Response, Blueprint, jsonify, request
|
||||
import logging
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
|
||||
from flask import Blueprint
|
||||
|
||||
from . import capture, record, preview, function
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
||||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
from openflexure_microscope.utilities import filter_dict
|
||||
|
||||
from flask import Response, jsonify, request, abort, url_for, redirect, send_file
|
||||
from flask import jsonify, request, abort, url_for, redirect, send_file
|
||||
|
||||
|
||||
class ListAPI(MicroscopeView):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
|
||||
from flask import jsonify, request
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
|
||||
from flask import jsonify, request
|
||||
import logging
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.views import MicroscopeViewPlugin
|
||||
|
||||
from flask import Blueprint, jsonify
|
||||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
|
||||
import logging
|
||||
import warnings
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from openflexure_microscope.api.v1.views import MicroscopeView
|
||||
from openflexure_microscope.api.views import MicroscopeView
|
||||
from openflexure_microscope.utilities import axes_to_array, filter_dict
|
||||
|
||||
from flask import Blueprint, jsonify, request
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from openflexure_microscope.api.v1.views import MethodView
|
||||
from openflexure_microscope.api.views import MethodView
|
||||
from flask import jsonify, abort, Blueprint
|
||||
|
||||
from openflexure_microscope.common import tasks
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ as well as some Flask imports to simplify API route development
|
|||
|
||||
# Plugin classes
|
||||
from openflexure_microscope.plugins import MicroscopePlugin
|
||||
from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
|
||||
# Task management
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from openflexure_microscope.api.v1.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.api.views import MicroscopeViewPlugin
|
||||
from openflexure_microscope.exceptions import TaskDeniedException
|
||||
|
||||
from flask import request, Response, escape, jsonify, abort
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue