feat: add CI/CD workflow and sync latest workspace changes

This commit is contained in:
chengkai3
2026-04-12 00:03:30 +08:00
parent add7517a1d
commit 0eb656aaf2
42 changed files with 2055 additions and 96 deletions
+2 -29
View File
@@ -1,30 +1,3 @@
from functools import lru_cache
from .core.config import Settings, get_settings
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
api_name: str = "fquiz-api"
api_version: str = "0.1.0"
api_host: str = "0.0.0.0"
api_port: int = 8000
api_cors_origins: str = "http://localhost:3000,http://127.0.0.1:3000"
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
case_sensitive=False,
)
@property
def cors_origins(self) -> list[str]:
return [
origin.strip()
for origin in self.api_cors_origins.split(",")
if origin.strip()
]
@lru_cache
def get_settings() -> Settings:
return Settings()
__all__ = ["Settings", "get_settings"]