masto-bridges/masto_git_bridge/config.py

16 lines
352 B
Python
Raw Normal View History

2022-11-08 03:13:35 +00:00
from pathlib import Path
from pydantic import BaseSettings, AnyHttpUrl
class Config(BaseSettings):
MASTO_URL:AnyHttpUrl
MASTO_TOKEN:str
GIT_REPO:Path
GIT_REMOTE_URL:AnyHttpUrl
LOGDIR:Path=Path().home() / '.mastogit'
class Config:
env_file = '.env'
env_file_encoding = 'utf-8'
env_prefix = "MASTOGIT_"