-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
49 lines (40 loc) · 1.2 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
class Config:
"""
This class defines some general configs
....
Attributes
----------
SECRET_KEY: str
get the private_key from environment variable
TEMPORAL_FOLDER: str
defines a temporary folders to use as tmp
TEMPLATES_AUTORELOAD: boolean
defines autoreload property
SPARQL_ENDPOINT: str
get sparql endpoint
"""
SECRET_KEY = os.environ.get("SECRET_KEY") or "harder to guess string"
TEMPORAL_FOLDER = os.environ.get("TEMPORAL_FOLDER") or "tmp"
TEMPLATES_AUTORELOAD = True
SPARQL_ENDPOINT = 'https://fuseki.matolab.org/alutrace/sparql'
SPARKLIS_OPTIONS = "&entity_lexicon_select=http%3A//www.w3.org/2000/01/rdf-schema%23label&concept_lexicons_select=http%3A//www.w3.org/2000/01/rdf-schema%23label&concept_tooltips_select=http%3A//www.w3.org/2000/01/rdf-schema%23comment"
class DevelopmentConfig(Config):
"""
Attributes
----------
config: object
"""
DEBUG = True
class ProductionConfig(Config):
"""
Attributes
----------
config: object
"""
DEBUG = False
config = {
"development": DevelopmentConfig,
"production": ProductionConfig,
"default": DevelopmentConfig
}