16 lines
381 B
Python
16 lines
381 B
Python
from typing import Optional
|
|
from pydantic_settings import BaseSettings
|
|
from pydantic import Field
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv(override=True)
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
bot_token: str = Field(alias="BOT_TOKEN")
|
|
postgres_url: str = Field(alias="POSTGRES_URL")
|
|
proxy: Optional[str] = Field(None, alias="PROXY")
|
|
|
|
|
|
settings = Settings() # type: ignore
|