Пример #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