def get_all_samples(): """ Schema export. """ sample_schema = SampleSchema() data = Sample.query.all() return sample_schema.dump(data).data
def schema_export_all(): """ Schema export. """ sample_schema = SampleSchema(many=True) data = Sample.query.all() return sample_schema.dump(data).data
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
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
def schema_export(sample): """ Schema export. """ sample_schema = SampleSchema() return sample_schema.dump(sample).data
def schema_export_many(samples): """ Export a list of samples """ sample_schema = SampleSchema(many=True) return sample_schema.dump(samples).data