Files
icysanta 5402524456
Some checks failed
CI / backend (push) Failing after 9s
CI / frontend (push) Failing after 4s
Настройка конфигурации API
2025-12-01 11:38:02 +00:00

15 lines
409 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from os import getenv
from dotenv import load_dotenv
load_dotenv()
class Config:
"""
Конфигурация FastAPI приложения.
Все значения берутся из .env или имеют дефолтные.
"""
HOST: str = getenv("HOST", "0.0.0.0")
PORT: int = int(getenv("PORT", "80"))
DEBUG: bool = getenv("DEBUG", "False").lower() in ("1", "true", "yes")