mirror of
https://github.com/sstent/GarminSync.git
synced 2026-01-25 16:42:20 +00:00
16 lines
434 B
Python
16 lines
434 B
Python
from dotenv import load_dotenv
|
|
import os
|
|
|
|
def load_config():
|
|
"""Load environment variables from .env file"""
|
|
load_dotenv()
|
|
|
|
class Config:
|
|
GARMIN_EMAIL = os.getenv("GARMIN_EMAIL")
|
|
GARMIN_PASSWORD = os.getenv("GARMIN_PASSWORD")
|
|
|
|
@classmethod
|
|
def validate(cls):
|
|
if not cls.GARMIN_EMAIL or not cls.GARMIN_PASSWORD:
|
|
raise ValueError("Missing GARMIN_EMAIL or GARMIN_PASSWORD in environment")
|