mirror of
https://github.com/AtHeartEngineer/poap-reddit-bot.git
synced 2026-01-09 20:48:04 -05:00
18 lines
574 B
Python
18 lines
574 B
Python
from pydantic import BaseSettings
|
|
from pydantic.env_settings import SettingsSourceCallable
|
|
from typing import Tuple
|
|
|
|
class DBSettings(BaseSettings):
|
|
url: str
|
|
|
|
class Config:
|
|
env_prefix = 'db_'
|
|
|
|
@classmethod
|
|
def customise_sources(
|
|
cls,
|
|
init_settings: SettingsSourceCallable,
|
|
env_settings: SettingsSourceCallable,
|
|
file_secret_settings: SettingsSourceCallable,
|
|
) -> Tuple[SettingsSourceCallable, ...]:
|
|
return env_settings, init_settings, file_secret_settings |