Loading openflexure_microscope/api/app.py +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import logging, logging.handlers import os import pkg_resources from flask import Flask, jsonify, send_file from flask import Flask, send_file from datetime import datetime Loading Loading @@ -129,7 +129,7 @@ def routes(): """ List of all connected API routes """ return jsonify(list_routes(app)) return list_routes(app) @app.route("/log") Loading openflexure_microscope/api/default_extensions/autofocus.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from labthings.server.extensions import BaseExtension from labthings.server.view import View from labthings.server.decorators import ThingAction, ThingProperty, marshal_task from openflexure_microscope.devel import JsonResponse, request, jsonify, taskify, abort from openflexure_microscope.devel import JsonResponse, request, taskify, abort from openflexure_microscope.utilities import set_properties import time Loading Loading @@ -309,7 +309,7 @@ class MeasureSharpnessAPI(View): if not microscope: abort(503, "No microscope connected. Unable to measure sharpness.") return jsonify({"sharpness": measure_sharpness(microscope)}) return {"sharpness": measure_sharpness(microscope)} @ThingAction Loading openflexure_microscope/api/default_extensions/zip_builder.py +0 −1 Original line number Diff line number Diff line from openflexure_microscope.devel import ( JsonResponse, request, jsonify, taskify, update_task_progress, ) Loading openflexure_microscope/api/example_extensions/ev_gui.py +2 −4 Original line number Diff line number Diff line Loading @@ -6,8 +6,6 @@ from openflexure_microscope.api.utilities.gui import build_gui import logging from flask import jsonify # Some value that will change over time # Here, we add 1 to it every time a GET request is made val_int = 0 Loading Loading @@ -81,7 +79,7 @@ class TestAPIView(View): def get(self): global val_int val_int += 1 return jsonify({"val": True}) return {"val": True} @ThingAction Loading @@ -89,7 +87,7 @@ class TestDoAPIView(View): def post(self): global val_int val_int += 1 return jsonify({"val": True}) return {"val": True} # Using the dynamic form Loading openflexure_microscope/api/v2/views/actions/camera.py +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ from openflexure_microscope.api.v2.views.captures import capture_schema import logging import io from flask import jsonify, request, abort, url_for, redirect, send_file from flask import request, abort, url_for, redirect, send_file @ThingAction Loading Loading @@ -164,7 +164,7 @@ class GPUPreviewStartAPI(View): microscope.camera.start_preview(fullscreen=fullscreen, window=window) # TODO: Make schema for microscope state return jsonify(microscope.state) return microscope.state @ThingAction Loading @@ -176,4 +176,4 @@ class GPUPreviewStopAPI(View): microscope = find_component("org.openflexure.microscope") microscope.camera.stop_preview() # TODO: Make schema for microscope state return jsonify(microscope.state) return microscope.state Loading
openflexure_microscope/api/app.py +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import logging, logging.handlers import os import pkg_resources from flask import Flask, jsonify, send_file from flask import Flask, send_file from datetime import datetime Loading Loading @@ -129,7 +129,7 @@ def routes(): """ List of all connected API routes """ return jsonify(list_routes(app)) return list_routes(app) @app.route("/log") Loading
openflexure_microscope/api/default_extensions/autofocus.py +2 −2 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ from labthings.server.extensions import BaseExtension from labthings.server.view import View from labthings.server.decorators import ThingAction, ThingProperty, marshal_task from openflexure_microscope.devel import JsonResponse, request, jsonify, taskify, abort from openflexure_microscope.devel import JsonResponse, request, taskify, abort from openflexure_microscope.utilities import set_properties import time Loading Loading @@ -309,7 +309,7 @@ class MeasureSharpnessAPI(View): if not microscope: abort(503, "No microscope connected. Unable to measure sharpness.") return jsonify({"sharpness": measure_sharpness(microscope)}) return {"sharpness": measure_sharpness(microscope)} @ThingAction Loading
openflexure_microscope/api/default_extensions/zip_builder.py +0 −1 Original line number Diff line number Diff line from openflexure_microscope.devel import ( JsonResponse, request, jsonify, taskify, update_task_progress, ) Loading
openflexure_microscope/api/example_extensions/ev_gui.py +2 −4 Original line number Diff line number Diff line Loading @@ -6,8 +6,6 @@ from openflexure_microscope.api.utilities.gui import build_gui import logging from flask import jsonify # Some value that will change over time # Here, we add 1 to it every time a GET request is made val_int = 0 Loading Loading @@ -81,7 +79,7 @@ class TestAPIView(View): def get(self): global val_int val_int += 1 return jsonify({"val": True}) return {"val": True} @ThingAction Loading @@ -89,7 +87,7 @@ class TestDoAPIView(View): def post(self): global val_int val_int += 1 return jsonify({"val": True}) return {"val": True} # Using the dynamic form Loading
openflexure_microscope/api/v2/views/actions/camera.py +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ from openflexure_microscope.api.v2.views.captures import capture_schema import logging import io from flask import jsonify, request, abort, url_for, redirect, send_file from flask import request, abort, url_for, redirect, send_file @ThingAction Loading Loading @@ -164,7 +164,7 @@ class GPUPreviewStartAPI(View): microscope.camera.start_preview(fullscreen=fullscreen, window=window) # TODO: Make schema for microscope state return jsonify(microscope.state) return microscope.state @ThingAction Loading @@ -176,4 +176,4 @@ class GPUPreviewStopAPI(View): microscope = find_component("org.openflexure.microscope") microscope.camera.stop_preview() # TODO: Make schema for microscope state return jsonify(microscope.state) return microscope.state