-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
37 lines (26 loc) · 876 Bytes
/
config.py
File metadata and controls
37 lines (26 loc) · 876 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
# Copyright (C) 2022-Present Indoc Systems
#
# Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE,
# Version 3.0 (the "License") available at https://www.gnu.org/licenses/agpl-3.0.en.html.
# You may not use this file except in compliance with the License.
import logging
from functools import lru_cache
from pydantic import BaseSettings
from pydantic import Extra
class Settings(BaseSettings):
"""Store service configuration settings."""
DATAOPS_SERVICE: str
METADATA_SERVICE: str
K8S_NAMESPACE: str = 'greenroom'
GREEN_ZONE_LABEL: str = 'Greenroom'
CORE_ZONE_LABEL: str = 'Core'
LOGGING_LEVEL: int = logging.INFO
LOGGING_FORMAT: str = 'json'
class Config:
env_file = '.env'
env_file_encoding = 'utf-8'
extra = Extra.allow
@lru_cache(1)
def get_settings():
settings = Settings()
return settings