Files
rf4-spotter/apps/api/app/config.py
T

24 lines
955 B
Python

from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
database_url: str = "postgresql+psycopg://rf4:rf4_local@localhost:5432/rf4_spotter"
admin_token: str = "change-me-in-production"
s3_endpoint_url: str = "http://localhost:9000"
s3_public_endpoint_url: str = "http://localhost:9000"
s3_access_key: str = "rf4-local"
s3_secret_key: str = "rf4-local-secret"
s3_bucket: str = "catch-screenshots"
screenshot_max_bytes: int = 8 * 1024 * 1024
official_records_url: str = "https://rf4game.de/records/region/RU/"
official_records_region: str = "RU"
official_records_category: str = "records"
official_import_required: bool = False
import_interval_seconds: int = Field(default=3600, ge=3600)
rate_limit_secret: str = "change-rate-limit-secret"
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
settings = Settings()