MCPcopy
hub / github.com/dataelement/Clawith / Settings

Class Settings

backend/app/config.py:77–159  ·  view source on GitHub ↗

Application settings loaded from environment variables.

Source from the content-addressed store, hash-verified

75
76
77class Settings(BaseSettings):
78 """Application settings loaded from environment variables."""
79
80 # App
81 APP_NAME: str = "Clawith"
82 APP_VERSION: str = _read_version()
83 DEBUG: bool = False
84 SECRET_KEY: str = "change-me-in-production"
85 API_PREFIX: str = "/api"
86
87 # Database
88 DATABASE_URL: str = "postgresql+asyncpg://clawith:clawith@localhost:5432/clawith"
89
90 # Redis
91 REDIS_URL: str = "redis://localhost:6379/0"
92 INSTANCE_ID: str = _default_instance_id()
93
94 # JWT
95 JWT_SECRET_KEY: str = "change-me-jwt-secret"
96 JWT_ALGORITHM: str = "HS256"
97 JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 # 24 hours
98 PASSWORD_RESET_TOKEN_EXPIRE_MINUTES: int = 60
99 EMAIL_VERIFICATION_TOKEN_EXPIRE_MINUTES: int = 60 # 1 hour
100 EMAIL_VERIFICATION_REQUIRED: bool = False # Require email verification for login
101
102 # File Storage
103 STORAGE_BACKEND: str = "local"
104 AGENT_DATA_DIR: str = _default_agent_data_dir()
105 AGENT_TEMPLATE_DIR: str = _default_agent_template_dir()
106 STORAGE_LOCAL_ROOT: str = _default_agent_data_dir()
107 STORAGE_LOCAL_FALLBACK_ENABLED: bool = True
108 S3_BUCKET: str = ""
109 S3_REGION: str = ""
110 S3_ENDPOINT_URL: str = ""
111 S3_ACCESS_KEY_ID: str = ""
112 S3_SECRET_ACCESS_KEY: str = ""
113 S3_PREFIX: str = "agents"
114 S3_PRESIGN_TTL_SECONDS: int = 3600
115 S3_MAX_POOL_CONNECTIONS: int = 50
116 S3_WRITE_WORKERS: int = 32
117
118 # Process role
119 PROCESS_ROLE: str = "all"
120
121 # Docker (for Agent containers)
122 DOCKER_NETWORK: str = "clawith_network"
123 OPENCLAW_IMAGE: str = "openclaw:local"
124 OPENCLAW_GATEWAY_PORT: int = 18789
125
126 # Feishu OAuth
127 FEISHU_APP_ID: str = ""
128 FEISHU_APP_SECRET: str = ""
129 FEISHU_REDIRECT_URI: str = ""
130 PUBLIC_BASE_URL: str = ""
131 HTTP_PROXY: str = ""
132
133 # CORS
134 CORS_ORIGINS: list[str] = ["http://localhost:3000", "http://localhost:5173"]

Callers 1

get_settingsFunction · 0.85

Calls 5

_read_versionFunction · 0.85
_default_instance_idFunction · 0.85
_default_agent_data_dirFunction · 0.85

Tested by

no test coverage detected