Skip to content

jhurl3y/garmin-api

Repository files navigation

FastAPI wrapper around garminconnect, utilising DynamoDB to bypass request throttling from garmin connect, hosted on AWS.

To run yourself

  1. Create the following DynamoDB tables, with Id as the partition key:
Name
Activity
Stats
HeartRate
Steps
  1. Add your garmin email/password to Secrets Manager. Call it something e.g. secret_example and add two rows, EMAIL and PASSWORD with your actual garmin email/password.

  2. Create .env file in project root like so:

SECRET_NAME=secret_example
SECRET_ARN=secret_example-arn # arn for secret created
REGION=eu-west-1
STAGE=dev
NAME_TABLE=Name
ACTIVITY_TABLE=Activity
STATS_TABLE=Stats
HEART_TABLE=HeartRate
STEPS_TABLE=Steps
ACTIVITY_SPLITS_TABLE=ActivitySplits
ACTIVITY_DETAILS_TABLE=ActivityDetails
ACTIVITY_WEATHER_TABLE=ActivityWeather
ACTIVITY_HEART_RATE_ZONES_TABLE=ActivityHeartRateZones
DEVICE_LAST_USED_TABLE=DeviceLastUsed
  1. From the terminal:
# Set up virtualenv
pyenv virtualenv VERSION garmin-api
pyenv local garmin-api

# Install deps
pip install -r requirements.txt
npm i -g serverless
npm i

# Set up aws keys
aws configure

# Start server locally
uvicorn main:app --reload

# Test serverless offline
sls offline

# Deploy to aws
npm run deploy-dev
npm run deploy-prod

About

API for garmin connect

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages