Files
KiraTV/backend/config.py
T
joaquin f5d6745ed0 Initial commit: KiraTV IPTV proxy server
Full-stack IPTV management system with Xtream Codes API compatibility,
multi-account provider fan-out, Jellyfin local library integration,
real-time dashboard, EPG support, and A/V-sync-safe stream recovery.
2026-05-17 23:22:05 +02:00

35 lines
903 B
Python

from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
database_url: str = "postgresql+asyncpg://kirastream:kirastream_secret_2024@localhost/kirastream"
redis_url: str = "redis://localhost:6379/0"
secret_key: str = "kirastream-super-secret-change-in-production-2024"
algorithm: str = "HS256"
access_token_expire_minutes: int = 60 * 24 * 7 # 7 days
admin_username: str = "admin"
admin_password: str = "kiraadmin"
stream_chunk_size: int = 65536 # 64 KB chunks
stream_queue_maxsize: int = 100
stream_connect_timeout: int = 10
stream_read_timeout: int = 30
epg_refresh_hours: int = 12
m3u_cache_minutes: int = 30
log_level: str = "INFO"
class Config:
env_file = "/opt/kirastream/.env"
@lru_cache
def get_settings() -> Settings:
return Settings()
settings = get_settings()