Skip to content

DanielLepold/garmin-fit-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Garmin fir parser

A lightweight Python tool for downloading recent Garmin activities, extracting VO₂ Max values from .fit files, and visualizing the progression by activity type.

  • Authenticates via Garmin Connect Web API using the user's email and password.
  • Downloads .fit files as binary via the Garmin Web API endpoint.
  • Filters activities by supported types (Running, Trail Running, Walking, Cycling).
  • Returns and visualizes in-memory data with activity metadata.

There is a detailed description about the tool on medium.com, pls have a look: https://medium.com/@daniel.lepold/visualise-your-precise-vo₂-max-from-garmin-data-in-python-2d76e50e437c


📦 Features

  • 🔐 Secure login via GUI (email & password)
  • ⬇️ Downloads recent Garmin activities (Running, Trail Running, Walking, Cycling)
  • 💾 Parses .fit data in memory – no need to save files locally
  • 🧠 Extracts VO₂ Max values using garmin_fit_sdk
  • 📊 Plots progression over time with points color-coded by activity type

🚀 Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/garmin-vo2-extractor.git
cd garmin-vo2-extractor

2. Install Dependencies

pip install -r requirements.txt

3. Run the Application

python main.py

A GUI window will appear to input your credentials and choose how many recent activities to download.


📁 Example Folder Structure

garmin-fit-parser/
├── main.py
├── gui.py
├── garmin_service.py
├── fit_sdk_parser.py
├── visualisation.py
├── utils.py
├── requirements.txt
└── README.md

🧩 Module Overview

main.py

Entry point. Launches the GUI and coordinates the process:

  • Login
  • Activity download
  • VO₂ Max extraction
  • Plotting

gui.py

Tkinter-based GUI interface.

  • Prompts for:
    • Email
    • Password
    • Number of activities
  • Calls GarminService, Parser, and the visualizer.

garmin_service.py

Garmin Connect interface layer.

  • Authenticates via garminconnect
  • Downloads .fit files as binary
  • Filters activities by supported types
  • Returns in-memory data with activity metadata

fit_sdk_parser.py

Parser for in-memory .fit files.

  • Uses garmin_fit_sdk to decode
  • Extracts VO₂ Max from message type 140
  • Attaches values back to each activity entry

visualisation.py

Matplotlib-based chart rendering.

  • Connects VO₂ Max values with a line (dark blue)
  • Adds colored dots per activity type:
    • running: 🔵 blue
    • trail_running: 🟢 green
    • walking: 🟠 orange
    • cycling: 🔴 red
  • Displays timeline-based progression

🖼 Sample Output

VO₂ Max Progression by Activity Type

Sample Chart Placeholder


📦 Requirements

  • Python 3.12.6
  • Dependencies:
    • garminconnect
    • garmin-fit-sdk
    • matplotlib
    • tkinter (usually bundled with Python)

⚠️ Disclaimer

This project is not affiliated with Garmin. Use at your own discretion. All credentials are handled locally via GUI and not stored.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages