-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
37 lines (27 loc) · 773 Bytes
/
config.py
File metadata and controls
37 lines (27 loc) · 773 Bytes
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
"""Configuration for this server
"""
import os
from server.types import ServerConfig
class Config(ServerConfig):
"""Main Config Gets K, V
V - From Environment Varaibles By The Name of K
"""
DEBUG = os.environ.get("PROJECT_DEBUG", False) == "True"
DB_STORAGE_PATH = os.environ.get(
"DB_STORAGE_PATH", os.path.join("storage", "db_storage.sqlite"))
class DebugConfig(Config):
"""Debug Config
"""
DEBUG = True
class DevConfig(Config):
"""Development Config
Varaibles need for development server
"""
DEBUG = True
HOST = "localhost"
PORT = 5000
class TestConfig(Config):
"""This Config only for UnitTests
"""
DEBUG = True
DB_STORAGE_PATH = os.path.join("test", "db_storage.sqlite")