diff options
author | BonfaceKilz | 2021-03-26 09:48:13 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-08 19:19:47 +0300 |
commit | baf2b6daa2c9d8646a68465269d1a64646e0e162 (patch) | |
tree | acc0ce1310053d74d6783d58b356ff67907c8bff /gn3 | |
parent | ae9ef7338815666721141efc352601e255f0f655 (diff) | |
download | genenetwork3-baf2b6daa2c9d8646a68465269d1a64646e0e162.tar.gz |
Add endpoints for (batch) entering phenotypes and genotypes
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/api/data_entry.py | 18 | ||||
-rw-r--r-- | gn3/app.py | 2 |
2 files changed, 20 insertions, 0 deletions
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") @@ -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 |