46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
"""Application configuration"""
|
|
from typing import Optional
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
# Application
|
|
app_name: str = "ai.card"
|
|
app_version: str = "0.1.0"
|
|
debug: bool = False
|
|
|
|
# API
|
|
api_v1_prefix: str = "/api/v1"
|
|
|
|
# Database
|
|
database_url: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/aicard"
|
|
database_url_supabase: Optional[str] = None
|
|
use_supabase: bool = False
|
|
|
|
# atproto
|
|
atproto_pds_url: Optional[str] = None
|
|
atproto_handle: Optional[str] = None
|
|
atproto_password: Optional[str] = None
|
|
|
|
# Card probabilities (in percentage)
|
|
prob_normal: float = 99.789
|
|
prob_rare: float = 0.1
|
|
prob_super_rare: float = 0.01
|
|
prob_kira: float = 0.1
|
|
prob_unique: float = 0.0001
|
|
|
|
# Unique card settings
|
|
max_unique_cards: int = 1000 # Maximum number of unique cards
|
|
|
|
# CORS
|
|
cors_origins: list[str] = ["http://localhost:3000", "https://card.syui.ai"]
|
|
|
|
# Security
|
|
secret_key: str = "your-secret-key-change-this-in-production"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings() |