19 lines
549 B
Python
19 lines
549 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")
|
|
admin_group_id: int = Field(alias="ADMIN_GROUP_ID")
|
|
remnawave_url: str = Field(alias="REMNAWAVE_URL")
|
|
remnawave_token: str = Field(alias="REMNAWAVE_TOKEN")
|
|
|
|
|
|
settings = settings() # type: ignore
|