initial commit

This commit is contained in:
2026-03-16 06:52:12 +01:00
parent b496d726d3
commit 251dc829b3
14 changed files with 465 additions and 0 deletions

21
infrastructure/config.py Normal file
View File

@@ -0,0 +1,21 @@
import os
from dataclasses import dataclass
@dataclass(frozen=True)
class Config:
api_url: str
api_key: str
task_name: str
max_retries: int
retry_base_delay: float
@classmethod
def from_env(cls) -> "Config":
return cls(
api_url=os.getenv("RAILWAY_API_URL", "https://hub.ag3nts.org/verify"),
api_key=os.environ["RAILWAY_API_KEY"],
task_name=os.getenv("RAILWAY_TASK_NAME", "railway"),
max_retries=int(os.getenv("RAILWAY_MAX_RETRIES", "10")),
retry_base_delay=float(os.getenv("RAILWAY_RETRY_BASE_DELAY", "2.0")),
)