示例#1
0
 def get_all_samples():
     """
         Schema export.
     """
     sample_schema = SampleSchema()
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#2
0
 def schema_export_all():
     """
         Schema export.
     """
     sample_schema = SampleSchema(many=True)
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#3
0
 def schema_export_all():
     """
         Schema export.
     """
     sample_schema = SampleSchema(many=True)
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#4
0
 def get_all_samples():
     """
         Schema export.
     """
     sample_schema = SampleSchema()
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#5
0
 def schema_export_all():
     """
         Schema export.
     """
     # TODO : any sample, not only PE ones.
     sample_schema = SampleSchema(many=True)
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#6
0
 def schema_export_all():
     """
         Schema export.
     """
     # TODO : any sample, not only PE ones.
     sample_schema = SampleSchema(many=True)
     data = Sample.query.all()
     return sample_schema.dump(data).data
示例#7
0
def api_get_unique_sample(sid):
    sample_schema = SampleSchema()
    data = Sample.query.get(sid)
    if data is None:
        return '{}'
    result = sample_schema.dump(data).data
    data = jsonify({'samples': result})
    return data
示例#8
0
def api_get_unique_sample(sid):
    sample_schema = SampleSchema()
    data = Sample.query.get(sid)
    if data is None:
        return '{}'
    result = sample_schema.dump(data).data
    data = jsonify({'samples': result})
    return data
示例#9
0
 def schema_export(sample):
     """
         Schema export.
     """
     sample_schema = SampleSchema()
     return sample_schema.dump(sample).data
示例#10
0
 def schema_export(sample):
     """
         Schema export.
     """
     sample_schema = SampleSchema()
     return sample_schema.dump(sample).data
示例#11
0
 def schema_export_many(samples):
     """
         Export a list of samples
     """
     sample_schema = SampleSchema(many=True)
     return sample_schema.dump(samples).data
示例#12
0
 def schema_export_many(samples):
     """
         Export a list of samples
     """
     sample_schema = SampleSchema(many=True)
     return sample_schema.dump(samples).data