Coverage for serverctl_deployd/config.py : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2Contains the global configuration for the API.
3(Modify the .env file to change the values)
4"""
6import os
7from pathlib import Path
8from typing import Optional
10from dotenv import find_dotenv, load_dotenv
11from pydantic import BaseSettings
13load_dotenv(find_dotenv())
16class Settings(BaseSettings): # pylint: disable=too-few-public-methods
17 """Class for global settings"""
18 environment: Optional[str] = os.getenv("ENVIRONMENT")
19 log_level: str = os.getenv("LOGLEVEL", "WARNING").upper()
20 deployments_dir: Path = Path(os.getenv("DEPLOYMENTS_DIR",
21 ".serverctl/"))
24settings = Settings()