15 lines
538 B
Python
15 lines
538 B
Python
from pathlib import Path
|
|
from typing import Set
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
directory: Path = Field(default=Path.cwd() / "work")
|
|
output_directory: Path = Field(default=Path.cwd() / "output")
|
|
feeds: Set[str] = Field(default={"default"})
|
|
url_base: str = Field(default="https://example.com")
|
|
delete_consume_files: bool = Field(default=False)
|
|
|
|
model_config = SettingsConfigDict(env_nested_delimiter="__", env_prefix="PG_")
|