feat: adding confz configuration

This commit is contained in:
Mose Müller 2023-08-02 12:06:19 +02:00
parent 3858c7efc2
commit 617450c2bf

View File

@ -0,0 +1,12 @@
from pathlib import Path
from typing import Literal
from confz import ConfZ, ConfZEnvSource
CONFIG_DIR = Path(__file__).parent.parent.parent.resolve() / "config"
class OperationMode(ConfZ): # type: ignore
environment: Literal["development"] | Literal["production"] = "production"
CONFIG_SOURCES = ConfZEnvSource(allow=["ENVIRONMENT"])