FreeScript
python-garminconnect
by cyberjunky · version 2026.10.31 · updated yesterday
No reviews yet
- Downloads
- 0
- Reviews
- 0
- Size
- 336 KB
- Code check
- Clean
- Licence
- MIT
- Released
- Nov 2026
Python 3 API wrapper for Garmin Connect to get statistics and set activities
[![GitHub Release][releases-shield]][releases]
[![GitHub Activity][commits-shield]][commits]
[![License][license-shield]](LICENSE)
![Project Maintenance][maintenance-shield]
Python: Garmin Connect
The Garmin Connect API library comes with two examples:
API Coverage Statistics
📖 About
This library enables developers to programmatically access Garmin Connect data including:
📦 Installation
Requires Python 3.12 or later.
Install from PyPI:
Upgrading from 0.2.x (garth)
Since 0.3.0 this library no longer uses
Sessions saved by older versions (
created with
client to
username and password; new tokens are saved to
tokenstore and are used for later logins:
Run demo software (recommended)
Clone the
…
[![GitHub Activity][commits-shield]][commits]
[![License][license-shield]](LICENSE)
![Project Maintenance][maintenance-shield]
Python: Garmin Connect
The Garmin Connect API library comes with two examples:
- **
example.py** - Simple getting-started example showing authentication, token storage, and basic API calls - **
demo.py- Comprehensive demo providing access to 270 API methods organized into 15 categories** for easy navigation
$ ./demo.py
📁 Exported data will be saved to the directory: 'your_data'
📄 All API responses are written to: 'response.json'
Attempting to login using stored tokens from: ~/.garminconnect
Successfully logged in using stored tokens!
📊 Your Stats Today: 4,045 steps | 1445.0 kcal
🐌 Time to get those legs moving!
==================================================
🚴 Full-blown Garmin Connect API Demo - Main Menu
==================================================
Select a category:
[1] 👤 User & Profile
[2] 📊 Daily Health & Activity
[3] 🔬 Advanced Health Metrics
[4] 📈 Historical Data & Trends
[5] 🏃 Activities & Workouts
[6] ⚖️ Body Composition & Weight
[7] 🏆 Goals & Achievements
[8] ⌚ Device & Technical
[9] 🎽 Gear & Equipment
[0] 💧 Hydration & Wellness
[a] 🔧 System & Export
[b] 📅 Training Plans & Calendar
[c] ⛳ Golf
[d] ✏️ Activity Editing
[e] 🏃 Activity Details & Courses
[q] Exit program
Make your selection:API Coverage Statistics
- Total API Methods: 348 methods; every method with a one-line description is listed in the Method Reference
- Categories: 15 organized sections
- Web-app endpoint map: the endpoints the Garmin Connect web app uses documented with the exact request it sends and whether it was verified live, in docs/API_ENDPOINTS.md; the dashboard's GraphQL operations are in docs/graphql_operations.md
- User & Profile: 8 methods (basic user info, settings)
- Daily Health & Activity: 21 methods (today's health data plus daily calories, resting HR and sleep ranges)
- Advanced Health Metrics: 35 methods (fitness metrics, HRV, VO2, FTP range, training readiness, training zones, running tolerance, training load balance, daily training status, activity training load)
- Historical Data & Trends: 29 methods (date range queries, weekly aggregates)
- Activities & Workouts: 37 methods (comprehensive activity, workout management, typed workout uploads including strength and swim CSS targets, in-place edit, scheduling, push to device, import, activity type/subtype filtering, earliest-upcoming-workout lookup, activity photos)
- Body Composition & Weight: 11 methods (weight tracking, body composition)
- Goals & Achievements: 24 methods (challenges, badges, goals)
- Device & Technical: 13 methods (device info, settings)
- Gear & Equipment: 13 methods (gear management, tracking, creation)
- Hydration & Wellness: 30 methods (hydration, nutrition, blood pressure, menstrual reads and writes, Jet Lag Adviser trips)
- System & Export: 5 methods (reporting, logout, GraphQL, health snapshot download)
- Training Plans & Calendar: 23 methods (calendar weeks/years/events, upcoming and primary race events, active plans and plan tasks, plans, plan by ID, typed strength workout uploads including timed sets, exercise catalog search, in-place workout editing, push to device, workout scheduling management)
- Golf: 5 methods (scorecard summary, scorecard detail, shot data, club stats, user stats)
- Activity Editing: 3 methods (set activity description, set strength-activity exercise sets)
- Activity Details & Courses: 13 methods (laps, rounds, step/jump/swim details, map and polyline, activity search, courses)
- Enhanced User Experience: Categorized navigation with emoji indicators
- Smart Data Management: Interactive weigh-in deletion with search capabilities
- Comprehensive Coverage: All major Garmin Connect features are accessible
- Error Handling: Robust error handling with user-friendly prompts
- Data Export: JSON export functionality for all data types
📖 About
This library enables developers to programmatically access Garmin Connect data including:
- Health Metrics: Heart rate, sleep, stress, body composition, SpO2, HRV
- Activity Data: Workouts, typed workout uploads (running, cycling, swimming, strength), workout scheduling, exercises, training status, performance metrics, import-style uploads (no Strava re-export)
- Nutrition: Daily food logs, meals, and nutrition settings
- Golf: Scorecard summaries, scorecard details, shot-by-shot data
- Device Information: Connected devices, settings, alarms, solar data
- Goals & Achievements: Personal records, badges, challenges, race predictions
- Historical Data: Trends, progress tracking, date range queries
📦 Installation
Requires Python 3.12 or later.
Install from PyPI:
pip install --upgrade garminconnect curl_cffiUpgrading from 0.2.x (garth)
Since 0.3.0 this library no longer uses
garth, which is deprecated.Sessions saved by older versions (
oauth1_token.json/oauth2_token.json,created with
garth.save()) cannot be converted, and assigning a resumedclient to
Garmin().garth no longer does anything. Log in once with yourusername and password; new tokens are saved to
garmin_tokens.json in yourtokenstore and are used for later logins:
garmin = Garmin(email, password)
garmin.login("~/.garminconnect") # later runs: Garmin().login("~/.garminconnect")Run demo software (recommended)
Clone the
…