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()
"""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()
"""Get Unit system"""
print(client.get_unit_system()
"""Fetch your activities data"""
print(client.get_stats(today.isoformat())
"""Fetch your logged heart rates"""
print(client.get_heart_rates(today.isoformat())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
garminconnect-0.1.8.tar.gz
(3.9 kB
view hashes)