18 lines
494 B
Python
18 lines
494 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
class Settings(BaseSettings):
|
|
# Tandoor Server
|
|
API_KEY: str
|
|
TANDOOR_URL: str
|
|
|
|
# Security
|
|
SECRET_KEY: str
|
|
ALGORITHM: str = "HS256"
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
|
|
|
|
# Sagt Pydantic, dass es die Werte aus der .env-Datei laden soll
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
# Instanz erzeugen, die du im gesamten Projekt importierst
|
|
settings = Settings()
|