- Fix bank deposit/withdraw paths: /bank/deposit → /bank/deposit/item (and withdraw) - Fix cooldown error handling: 498 is "character not found" (raise immediately), 499 is "character in cooldown" (wait and retry) — was previously swapped - Fix events endpoint: use /events/active instead of /events for active game events - Fix action rate limiter: 7/2s → 20/2s to match actual API limits - Use page_size=10000 for static data pagination (items/monsters/resources/maps) to minimize API round-trips during cache refresh - Add missing character fields from API: wisdom, prospecting, initiative, threat, dmg, layer, map_id, effects, rune_slot, bag_slot, and *_max_xp for all skills - Fix skill bars to use actual max_xp from API instead of xp % 100 - Add rune_slot and bag_slot to equipment constants https://claude.ai/code/session_015BJtuNcKqcdqSJETj5xRjX
25 lines
769 B
Python
25 lines
769 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
artifacts_token: str = ""
|
|
database_url: str = "postgresql+asyncpg://artifacts:artifacts@db:5432/artifacts"
|
|
cors_origins: list[str] = ["http://localhost:3000"]
|
|
|
|
# Artifacts API
|
|
artifacts_api_url: str = "https://api.artifactsmmo.com"
|
|
|
|
# Rate limits (matching Artifacts API: 20 actions/2s, 20 data/1s)
|
|
action_rate_limit: int = 20 # actions per window
|
|
action_rate_window: float = 2.0 # seconds
|
|
data_rate_limit: int = 20 # data requests per window
|
|
data_rate_window: float = 1.0 # seconds
|
|
|
|
# Observability
|
|
sentry_dsn: str = ""
|
|
environment: str = "development"
|
|
|
|
model_config = {"env_file": ".env", "extra": "ignore"}
|
|
|
|
|
|
settings = Settings()
|