From baf2b6daa2c9d8646a68465269d1a64646e0e162 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 26 Mar 2021 09:48:13 +0300 Subject: Add endpoints for (batch) entering phenotypes and genotypes --- gn3/api/data_entry.py | 18 ++++++++++++++++++ gn3/app.py | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 gn3/api/data_entry.py (limited to 'gn3') diff --git a/gn3/api/data_entry.py b/gn3/api/data_entry.py new file mode 100644 index 0000000..e69a6cb --- /dev/null +++ b/gn3/api/data_entry.py @@ -0,0 +1,18 @@ +"""Endpoints used for data entry""" +from flask import Blueprint +from flask import jsonify + + +data_entry = Blueprint("data_entry", __name__) + + +@data_entry.route("/phenotype", methods=["POST"], + strict_slashes=False) +def load_phenotype(): + return jsonify("Pass") + + +@data_entry.route("/genotype", methods=["POST"], + strict_slashes=False) +def load_genotype(): + return jsonify("Pass") diff --git a/gn3/app.py b/gn3/app.py index a684d25..dc89f55 100644 --- a/gn3/app.py +++ b/gn3/app.py @@ -7,6 +7,7 @@ from flask import Flask from gn3.api.gemma import gemma from gn3.api.general import general from gn3.api.correlation import correlation +from gn3.api.data_entry import data_entry def create_app(config: Union[Dict, str, None] = None) -> Flask: @@ -28,4 +29,5 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask: app.register_blueprint(general, url_prefix="/api/") app.register_blueprint(gemma, url_prefix="/api/gemma") app.register_blueprint(correlation, url_prefix="/api/correlation") + app.register_blueprint(data_entry, url_prefix="/api/dataentry") return app -- cgit v1.2.3