Initial commit
This commit is contained in:
26
backend_config.py
Normal file
26
backend_config.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Firefly III Analytics Backend - Configuration
|
||||
"""
|
||||
import os
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings from environment variables"""
|
||||
|
||||
# Firefly III
|
||||
FIREFLY_URL: str = os.getenv("FIREFLY_URL", "https://firefly.scsimedia.duckdns.org")
|
||||
FIREFLY_API_TOKEN: str = os.getenv("FIREFLY_API_TOKEN", "")
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = os.getenv("DATABASE_URL", "sqlite:///./data/app.db")
|
||||
|
||||
# Sync
|
||||
SYNC_INTERVAL_MINUTES: int = int(os.getenv("SYNC_INTERVAL_MINUTES", "30"))
|
||||
|
||||
# API
|
||||
API_TIMEOUT: int = 30
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user