db-manager/src/corpus.py

22 lines
646 B
Python
Raw Normal View History

2023-02-11 15:16:25 +00:00
#Imports
import os
import requests
import logger as log
CORPUS_URL = "https://publicdatafeeds.networkrail.co.uk/ntrod/SupportingFileAuthenticate?type=CORPUS"
#Fetch Configuration
log.out("corpus.py: Fetching CORPUS Configuration", "INFO")
CORPUS_USER = os.getenv('OWL_LDB_CORPUSUSER')
CORPUS_PASS = os.getenv('OWL_LDB_CORPUSPASS')
def hello():
print("hello")
return
def fetchCorpus():
r = requests.get(CORPUS_URL, auth=(CORPUS_USER, CORPUS_PASS))
## Need to ungzip the response
2023-02-11 15:17:51 +00:00
## See: https://stackoverflow.com/questions/40756106/decompress-python-requests-response-with-zlib
2023-02-11 15:16:25 +00:00
## Need to return the result
return