mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 17:12:00 +00:00
feat: Initial commit of FitTrack_GarminSync project
This commit is contained in:
18
examples/GarminSync/garminsync/config.py
Normal file
18
examples/GarminSync/garminsync/config.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
||||
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")
|
||||
Reference in New Issue
Block a user