first commit
This commit is contained in:
15
config.py
Normal file
15
config.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user