Improve auth models

This commit is contained in:
Urtzi Alfaro
2025-07-19 21:16:25 +02:00
parent abc8b68ab4
commit c7fd6135f0
9 changed files with 382 additions and 120 deletions

View File

@@ -4,6 +4,7 @@ Training service configuration
import os
from pydantic_settings import BaseSettings
from typing import List
class Settings(BaseSettings):
"""Application settings"""
@@ -38,6 +39,14 @@ class Settings(BaseSettings):
PROPHET_WEEKLY_SEASONALITY: bool = os.getenv("PROPHET_WEEKLY_SEASONALITY", "true").lower() == "true"
PROPHET_YEARLY_SEASONALITY: bool = os.getenv("PROPHET_YEARLY_SEASONALITY", "true").lower() == "true"
# CORS
CORS_ORIGINS: str = os.getenv("CORS_ORIGINS", "http://localhost:3000,http://localhost:3001")
@property
def CORS_ORIGINS_LIST(self) -> List[str]:
"""Get CORS origins as list"""
return [origin.strip() for origin in self.CORS_ORIGINS.split(",")]
class Config:
env_file = ".env"