Skip to main content

Python 3 API wrapper for Garmin Connect

Project description

Python: Garmin Connect

Python 3 API wrapper for Garmin Connect to get your statistics.

About

This package allows you to request your activity and health data you gather on Garmin Connect. See https://connect.garmin.com/

Installation

pip install garminconnect

Usage

from datetime import date

from garminconnect import (
    Garmin,
    GarminConnectConnectionError,
    GarminConnectTooManyRequestsError,
    GarminConnectAuthenticationError,
)

today = date.today()

_LOGGER = logging.getLogger(__name__)

"""Login to portal using specified credentials"""
    try:
        client = Garmin(YOUR_EMAIL, YOUR_PASSWORD)
    except (
        GarminConnectConnectionError,
        GarminConnectAuthenticationError,
        GarminConnectTooManyRequestsError,
    ) as err:
        print("Error occured during Garmin Connect Client setup: %s", err)
        return
    except Exception:  # pylint: disable=broad-except
        print("Unknown error occured during Garmin Connect Client setup")
        return

"""Get Full name"""
print(client.get_full_name('2020-01-04'))

"""Get Unit system"""
print(client.get_unit_system('2020-01-04'))

"""Fetch your activities data"""
print(client.get_stats('2020-01-04'))

"""Fetch your logged heart rates"""
print(client.get_heart_rates('2020-01-04'))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for garminconnect, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size garminconnect-0.1.7.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page