-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
37 lines (26 loc) · 1.08 KB
/
config.py
File metadata and controls
37 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Application configuration loaded from environment variables."""
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""All configuration is loaded from environment variables (or a .env file)."""
# GitHub App
github_app_id: str
github_private_key_path: str = "./private-key.pem"
github_webhook_secret: str
# Gemini
gemini_api_key: str
# Server
host: str = "0.0.0.0"
port: int = 8080
# Dev server defaults (can be overridden by repo .slop-fixer.yml)
dev_server_port: int = 3000
dev_server_startup_timeout: int = 120
# Cloudflare R2 Storage (Optional, for hosting screenshots)
r2_account_id: str | None = None
r2_access_key_id: str | None = None
r2_secret_access_key: str | None = None
r2_bucket_name: str | None = None
r2_public_url: str | None = None # e.g. https://pub-xxxx.r2.dev
model_config = {"env_file": ".env", "env_file_encoding": "utf-8", "extra": "allow"}
def get_settings() -> Settings:
"""Return a cached Settings instance."""
return Settings() # type: ignore[call-arg]