feat: evolve MetaBloom into full product foundation
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from functools import lru_cache
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
database_url: str = "sqlite:///./metabloom.db"
|
||||
jwt_secret: str = "change-me-in-production-at-least-32-characters"
|
||||
jwt_algorithm: str = "HS256"
|
||||
access_token_minutes: int = 30
|
||||
allowed_origins: str = "http://localhost:8081,http://localhost:19006"
|
||||
environment: str = "development"
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
@property
|
||||
def origins(self) -> list[str]:
|
||||
return [item.strip() for item in self.allowed_origins.split(",") if item.strip()]
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
|
||||
Reference in New Issue
Block a user