Files
localgenai/opencode/README.md

929 B

Garmin Data Fetcher

A Python script to download per-second activity data (heart rate, GPS, cadence, etc.) from Garmin Connect and extract it from FIT files for analysis.

Setup

  1. Create virtual environment:
python -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install garminconnect garmin_fit_sdk
  1. Set environment variables:
export GARMIN_EMAIL=your_email@example.com
export GARMIN_PASSWORD=your_password

Usage

Run the script to download and extract data:

python scripts/fetch_garmin_data.py

The script will:

  • Authenticate with Garmin Connect
  • Download the most recent activity's FIT file
  • Extract per-second record data (heart rate, GPS, cadence, etc.)
  • Save the data as JSON for analysis

Output

Data is saved in garmin_data/ as:

  • {activity_id}.fit - Original FIT file
  • {activity_id}_data.json - Extracted per-second records