Coverage for volexport/config2.py: 100%
11 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-09-28 12:48 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2025-09-28 12:48 +0000
1import os
2from pathlib import Path
3from typing_extensions import Annotated
4from pydantic import AfterValidator, Field
5from pydantic_settings import BaseSettings, SettingsConfigDict
7HomePath = Annotated[Path, AfterValidator(lambda v: v.expanduser())]
10class ConfigServer(BaseSettings):
11 """Configuration settings for the volexport application. (no default value)"""
13 model_config = SettingsConfigDict(env_prefix="VOLEXP_", env_file=os.getenv("VOLEXP_ENV_FILE"))
14 VG: str = Field(description="Volume Group name")
15 NICS: list[str] = Field(description="List of network interfaces to use")
18config2 = ConfigServer() # type: ignore