Blackened
This commit is contained in:
parent
6be8b0044a
commit
ab6fa9f0e5
11 changed files with 104 additions and 80 deletions
|
|
@ -169,7 +169,7 @@ atexit.register(cleanup)
|
|||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port="5000", threaded=True, debug=True, use_reloader=False)
|
||||
#from pprint import pprint
|
||||
#pprint(labthing.spec.to_dict())
|
||||
#with open('spec.yaml', 'w') as f:
|
||||
# f.write(labthing.spec.to_yaml())
|
||||
# from pprint import pprint
|
||||
# pprint(labthing.spec.to_dict())
|
||||
# with open('spec.yaml', 'w') as f:
|
||||
# f.write(labthing.spec.to_yaml())
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
||||
from openflexure_microscope.common.flask_labthings.resource import Resource
|
||||
from openflexure_microscope.common.flask_labthings.find import find_device
|
||||
from openflexure_microscope.common.flask_labthings.decorators import use_args, marshal_with, doc, doc_response
|
||||
from openflexure_microscope.common.flask_labthings.decorators import (
|
||||
use_args,
|
||||
marshal_with,
|
||||
doc,
|
||||
doc_response,
|
||||
)
|
||||
from openflexure_microscope.common.flask_labthings import fields
|
||||
from openflexure_microscope.utilities import filter_dict
|
||||
|
||||
|
|
@ -10,6 +15,7 @@ from openflexure_microscope.api.v2.views.captures import capture_schema
|
|||
import logging
|
||||
from flask import jsonify, request, abort, url_for, redirect, send_file
|
||||
|
||||
|
||||
@doc(tags=["actions"])
|
||||
class CaptureAPI(Resource):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ from marshmallow import pre_dump
|
|||
|
||||
class CaptureSchema(Schema):
|
||||
id = fields.String()
|
||||
file = fields.String(data_key="path", description="Path of file on microscope device")
|
||||
file = fields.String(
|
||||
data_key="path", description="Path of file on microscope device"
|
||||
)
|
||||
exists = fields.Bool(data_key="available")
|
||||
filename = fields.String()
|
||||
metadata = fields.Dict()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue