initial commit 2

This commit is contained in:
David
2026-05-22 18:58:35 -06:00
parent 1334540303
commit abfbb255fe
157 changed files with 8071 additions and 1 deletions

View File

View File

@@ -0,0 +1,25 @@
from functools import lru_cache
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8', extra='ignore')
database_url: str = 'postgresql+psycopg://postgres:password@127.0.0.1:5432/hackaton'
secret_key: str = 'change-this-in-production'
algorithm: str = 'HS256'
access_token_expire_minutes: int = 60 * 24 * 7
cors_origins: str = 'http://localhost:3000,http://10.0.2.2:3000'
@property
def cors_origin_list(self) -> list[str]:
return [origin.strip() for origin in self.cors_origins.split(',') if origin.strip()]
@lru_cache
def get_settings() -> Settings:
return Settings()
settings = get_settings()