from openflexure_microscope.api.utilities import JsonPayload from openflexure_microscope.api.v1.views import MicroscopeView from flask import Response, Blueprint, jsonify, request, abort, url_for, redirect, send_file import logging class ConfigAPI(MicroscopeView): def get(self): """ Get camera configuration .. :quickref: Camera config; Get camera configuration """ return jsonify(self.microscope.camera.config) def post(self): """ Modify camera configuration .. :quickref: Camera config; Set camera configuration **Example request**: .. sourcecode:: http POST /camera/capture HTTP/1.1 Accept: application/json { "analog_gain": 1.0, "digital_gain": 1.0, "jpeg_quality": 75, "picamera_params": { "framerate": 24.0, "saturation": 0, "shutter_speed": 5000 } } :>header Accept: application/json :