aboutsummaryrefslogtreecommitdiff
path: root/gn3/settings.py
diff options
context:
space:
mode:
authorArun Isaac2021-11-19 16:42:00 +0530
committerArun Isaac2021-12-02 17:03:52 +0530
commit0a29e362bd8627b9346e2260a14c81a46e2a76d3 (patch)
tree5c5d061aec5fbef5a63a8ddbe95a9a59f72ded7f /gn3/settings.py
parenta1516993c7f6dc608f75ba42cb27b983e0c5c330 (diff)
downloadgenenetwork3-0a29e362bd8627b9346e2260a14c81a46e2a76d3.tar.gz
Implement dataset metadata API endpoint.
* guix.scm: Import (gnu packages rdf). (genenetwork3)[propagated-inputs]: Add python-sparqlwrapper. * gn3/settings.py (SPARQL_ENDPOINT): New variable. * gn3/api/general.py: Import datasets from gn3.db. (dataset_metadata): New API endpoint. * gn3/db/datasets.py: Import re, Template from string, Dict and Optional from typing, JSON and SPARQLWrapper from SPARQLWrapper, SPARQL_ENDPOINT from gn3.settings. (sparql_query, dataset_metadata): New functions.
Diffstat (limited to 'gn3/settings.py')
-rw-r--r--gn3/settings.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gn3/settings.py b/gn3/settings.py
index 0ac6698..c945fbf 100644
--- a/gn3/settings.py
+++ b/gn3/settings.py
@@ -13,6 +13,9 @@ REDIS_JOB_QUEUE = "GN3::job-queue"
TMPDIR = os.environ.get("TMPDIR", tempfile.gettempdir())
RQTL_WRAPPER = "rqtl_wrapper.R"
+# SPARQL endpoint
+SPARQL_ENDPOINT = "http://localhost:8891/sparql"
+
# SQL confs
SQL_URI = os.environ.get(
"SQL_URI", "mysql://webqtlout:webqtlout@localhost/db_webqtl")