magpie/app/core/config.py
pyr0ball 2cc85d8fc5 feat: scaffold Magpie — campaign scheduler + social posting platform
FastAPI backend (SQLite + APScheduler), Vue 3 frontend, MCP server for
Claude integration, and Docker Compose stack. Includes campaign data model
(campaigns → variants → subs), post history, sub rules, and Playwright-based
Reddit posting layer migrated from claude-bridge/reddit-poster.

Also seeds legacy campaigns (6) and sub rules (14) from reddit-poster history.

Closes #1 (scaffold), resolves migration from claude-bridge.
2026-04-21 16:51:33 -07:00

26 lines
672 B
Python

from __future__ import annotations
from pathlib import Path
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
# Server
api_host: str = "0.0.0.0"
api_port: int = 8532
debug: bool = False
# Database
db_path: str = str(Path.home() / ".local" / "share" / "magpie" / "magpie.db")
# Reddit session
reddit_session_file: str = str(Path.home() / ".local" / "share" / "magpie" / "session.json")
# Scheduler
scheduler_enabled: bool = True
def get_settings() -> Settings:
return Settings()