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()


"""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 details)

Uploaded Source

File details

Details for the file garminconnect-0.1.8.tar.gz.

File metadata

  • Download URL: garminconnect-0.1.8.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for garminconnect-0.1.8.tar.gz
Algorithm Hash digest
SHA256 3d2ce591eea6e358fe21b5499b1bfb266300cee888ad33f90a48df881e2206cc
MD5 cb230660b36c7ef3f47b3879ef634182
BLAKE2b-256 137d563867866d35b0a9316660034a186aca42f215c7279d0e6c7eb230de0e65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page