22 lines
513 B
Python
22 lines
513 B
Python
from pydantic import Field
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
host: str = "0.0.0.0"
|
|
port: int = 8000
|
|
cors_origins: list[str] = Field(default_factory=lambda: ["http://localhost:3000"])
|
|
log_level: str = "info"
|
|
debug: bool = False
|
|
|
|
# Optional API keys (free tiers)
|
|
finnhub_api_key: str = ""
|
|
fred_api_key: str = ""
|
|
alphavantage_api_key: str = ""
|
|
|
|
model_config = {"env_prefix": "INVEST_API_", "env_file": ".env"}
|
|
|
|
|
|
settings = Settings()
|
|
|