Garth

0.8.0 · deprecated · verified Wed Apr 15

Garth is a Python client for Garmin SSO authentication and the Garmin Connect API. It provided a way to programmatically log in to Garmin Connect and access user data. As of version 0.8.0, Garth is deprecated and no longer maintained due to changes in Garmin's authentication flow, rendering the library effectively unusable for its primary purpose.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates the intended usage for logging into Garmin Connect. However, as of Garth v0.8.0, this functionality is broken and will likely fail due to changes in Garmin's authentication flow. The example is included for historical context and to explicitly highlight the library's deprecated and non-functional status.

import garth
import os

email = os.environ.get('GARMIN_EMAIL', 'your_email@example.com')
password = os.environ.get('GARMIN_PASSWORD', 'your_password')

print("Attempting to log in with Garth (will likely fail due to library deprecation).")

try:
    # This login method is now broken due to Garmin's auth flow changes as of Garth v0.8.0
    # It is provided for historical context of intended usage.
    garth.login(email, password)
    print("Login attempted successfully (unexpected).")
    # If login miraculously worked, you could access APIs like this:
    # user_profile = garth.client.connectapi('/userprofile-service/userprofile')
    # print(f"User Profile: {user_profile}")
except Exception as e:
    print(f"An error occurred during Garth login: {e}")
    print("This is expected because Garth is deprecated and no longer works with Garmin's current authentication.")
    print("Please see Garth's GitHub repository for more details on its deprecation.")

view raw JSON →