mastodon-ld/masto_ld/config.py

17 lines
366 B
Python

from pathlib import Path
from pydantic import BaseSettings, AnyHttpUrl
class Config(BaseSettings):
MASTO_URL:AnyHttpUrl
MASTO_TOKEN:str
WIKI_URL:AnyHttpUrl
WIKI_USER:str
WIKI_PASSWORD:str
LOGDIR:Path=Path().home() / '.mastold'
class Config:
env_file = '.env'
env_file_encoding = 'utf-8'
env_prefix = "MASTOLD_"