Initial lightweight AI agent admin
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from functools import lru_cache
|
||||
from typing import Optional
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = "AI Agent Admin"
|
||||
env: str = "dev"
|
||||
debug: bool = False
|
||||
app_host: str = "127.0.0.1"
|
||||
app_port: int = 18083
|
||||
database_url: str = "postgresql+asyncpg://ai_agent_admin:ai_agent_admin@127.0.0.1:5432/ai_agent_admin"
|
||||
redis_url: Optional[str] = "redis://127.0.0.1:6379/3"
|
||||
jwt_secret_key: str = "change-me-in-production"
|
||||
jwt_algorithm: str = "HS256"
|
||||
access_token_expire_minutes: int = 1440
|
||||
cors_origins: str = "*"
|
||||
seed_admin_email: str = "admin@ai-agent.local"
|
||||
seed_admin_password: str = "admin123456"
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
|
||||
|
||||
settings = get_settings()
|
||||
Reference in New Issue
Block a user