Library / SDK
cyberjunky/python-garminconnect avatar
cyberjunky/python-garminconnect

python-garminconnect: an unofficial Garmin Connect API wrapper for Python 3.12+

Python 3 API wrapper for Garmin Connect to get statistics and set activities

3,283 stars577 forksPythonMIT

At a glance

What is it?
The library wraps Garmin Connect's mobile SSO flow and exposes 154+ methods across 14 categories, from sleep and HRV to workout uploads. It is unofficial, token-based, and only as stable as the endpoints it mirrors.
Who is it for?
Adopt it if you already write Python and want Garmin Connect health, activity and workout data in your own scripts, and accept that the endpoints are unofficial. Do not adopt it if you need a supported integration with a contractual guarantee, or if you are on Python older than 3.12.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 22 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • cyberjunky/python-garminconnect3,283 ★ · +230
Star history
Repository2026-09-252026-11-22
cyberjunky/python-garminconnect3.1k3.3k

230 Stars in the last 58 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What python-garminconnect solves, and who it is for

Garmin publishes no public REST API for consumer Connect data. The only supported route into the platform is the connect.garmin.com web interface and the mobile app, which means any script that wants your own step count, sleep stages or VO2 max has to speak the same private endpoints the app speaks. python-garminconnect is a Python 3 wrapper around those endpoints. It is written for developers who already have a Garmin Connect account and want the data in a local process: a personal dashboard, a CSV export, a Home Assistant sensor, a training-load notebook. The README describes the package as a "comprehensive Python3 API wrapper for Garmin Connect, providing access to health, fitness, and device data", and the repository ships two entry points. example.py is the short getting-started script. demo.py is a menu-driven program the README describes as covering 154+ API methods in 14 categories, which is the fastest way to see what is reachable before you commit to writing code. The project is MIT licensed and the last push was on 2026-09-18, the same day release 0.3.16 was published. It is not archived.

How the wrapper talks to Garmin: SSO login, tokens, and 14 method categories

The authentication section of the README states that login uses "the same mobile SSO flow as the offic" (the sentence is cut off in the README as published). What is documented is the outcome: the library attempts a login, and on success it writes credentials to a token directory. The demo output quoted in the README shows the sequence plainly. It prints "Attempting to login using stored tokens from: ~/.garminconnect" and then "Successfully logged in using stored tokens!", so the token cache is the normal path after the first authentication, not an optimisation. That matters because it means a first run needs interactive credentials and later runs do not. Above the transport layer sits a flat set of methods grouped by subject. Daily Health and Activity has 10 methods. Advanced Health Metrics has 16, covering fitness metrics, HRV, VO2, FTP range, training readiness, training zones and running tolerance. Activities and Workouts is the largest group at 37 methods, including typed workout uploads for running, cycling, swimming, walking, hiking and strength, plus scheduling and push-to-device. Hydration and Wellness has 20 methods and includes menstrual reads and writes, which is unusual coverage for a fitness wrapper. Golf gets 5 methods for scorecards and shot data. The dependency list in pyproject.toml is short: curl_cffi, requests and ua-generator. curl_cffi and ua-generator together suggest the library is impersonating a browser or mobile client fingerprint, which is a reasonable design for an unofficial client and also the reason it can break without notice.

Installing python-garminconnect and making a first call

Requires Python 3.12 or later. The README gives the PyPI install as a single command, and it installs curl_cffi alongside the package rather than leaving it to you.

bash
pip install --upgrade garminconnect curl_cffi

If you would rather run the bundled examples, the README recommends cloning the repository and creating a virtual environment first. On Debian and Ubuntu the README flags externally-managed Python installs as a conflict risk, hence the venv step.

bash
python3 -m venv .venv --copies
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[example]"

Then run either script. example.py is the minimal path; demo.py opens the category menu.

bash
python3 ./example.py
python3 ./demo.py

With demo.py the README shows the program printing the export directory and the response file before login, then a menu of numbered categories from User and Profile through Activity Editing. Selecting a category prompts for a method. On a successful first login you should see the token directory line followed by the login confirmation, and in the README's own sample output a stats line reading "4,045 steps | 1445.0 kcal". Every response is also written to response.json, and exported data goes to the directory the program names at startup. That JSON dump is the practical starting point: run one method, read the raw shape, then write your own accessor against it.

Where it breaks: unofficial endpoints, truncation and the Python floor

The central limitation is not a bug, it is the premise. These are private Garmin endpoints reached through a mobile SSO flow, so a change on Garmin's side can invalidate a method between releases with no deprecation window. The release cadence reflects that: 0.3.14 and 0.3.15 landed on 2026-09-12 and 0.3.16 on 2026-09-18, which reads like endpoint chasing rather than feature work. If you need a data feed you can promise to someone else, this is the wrong tool. The Python floor is a second real constraint. requires-python is ">=3.12" and the classifiers list only 3.12 and 3.13. Anyone on 3.10 or 3.11, which is still common in long-lived containers and on Raspberry Pi images, cannot install it without upgrading the interpreter first. The README is also visibly incomplete in places: the authentication section stops mid-sentence, and the README does not document rollback, rate limits, or what happens when a token expires. The 154+ figure is described in the README itself as a snapshot, so treat it as a count at one point in time rather than a contract. Finally, the project has no homepage field; the repository URL in pyproject.toml is the canonical location, and the README points users at connect.garmin.com for the account side.

garth and the alternative of talking to Garmin yourself

garth is the obvious comparison, and it appears in the search data around this project. The difference is one of scope rather than quality. garth is an authentication and session library: you get a logged-in Garmin session and then construct your own requests against whatever endpoint you need. python-garminconnect sits a layer above that idea and ships the endpoints already mapped, which is why demo.py can present 14 categories and 154+ named methods without you reading any request code. The trade-off is control. With garth you decide exactly which URL is called and how the response is parsed, so a Garmin-side change affects only the calls you wrote. With python-garminconnect you inherit the maintainer's mapping and wait for a release when something shifts. Choose garth if you need one or two endpoints and want to own the request code. Choose this library if you want breadth quickly, or if you are exploring what Garmin exposes at all, in which case the category menu is doing work you would otherwise do by hand.

Maintenance, licence and the cost of upgrading

The project is MIT licensed, which in practice means you can vendor it, fork it or ship it inside a closed product, provided you keep the copyright notice and licence text. That is a statement about the licence file, not legal advice; if the licence matters to your organisation, read LICENSE in the repository. Maintenance looks current rather than dormant: the last push was on 2026-09-18 and three releases landed in the six days before it. The upgrade cost is low on the surface and uncertain underneath. The public surface is a set of methods, so a patch release rarely breaks a caller, but because the endpoints are unofficial, a version bump may be the only signal that a Garmin-side change occurred. Pin the version in your own requirements file and read the release notes before moving, because the changelog link in pyproject.toml points at the GitHub releases page and that is where the endpoint changes would be described. The development workflow itself is PDM-based, with pdm run format, pdm run lint and pdm run test as the checks the README asks contributors to run before a pull request.

Editorial conclusion

Adopt it if you already write Python and want Garmin Connect health, activity and workout data in your own scripts, and accept that the endpoints are unofficial. Do not adopt it if you need a supported integration with a contractual guarantee, or if you are on Python older than 3.12. Before writing anything on top, verify two things yourself: that the mobile SSO login succeeds against your account and region, and that the token directory at ~/.garminconnect is created and reused on the second run. Everything else is a convenience layer over those two facts.

Frequently asked questions

How much does it cost to use the Garmin API through python-garminconnect?

The library itself is MIT licensed and free to install from PyPI, and it requires a Garmin Connect account to authenticate against. The repository does not document any separate API fee, and the README points users at connect.garmin.com for the account itself.

Can I extract data from Garmin Connect with python-garminconnect?

Yes. The README describes JSON export functionality for all data types, and demo.py writes every API response to response.json while saving exported data to a directory it names at startup. The library covers health metrics, activities, nutrition, golf and device information.

Do I need the Garmin Connect app to use python-garminconnect?

The README does not say the mobile app is required, but it does state that authentication uses the same mobile SSO flow as the official client. You need a Garmin Connect account; the library handles the login and stores tokens in ~/.garminconnect for later runs.

Official sources

  1. cyberjunky/python-garminconnect on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/cyberjunky-python-garminconnect.svg)](https://hysenlabs.com/projects/cyberjunky-python-garminconnect)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/cyberjunky-python-garminconnect.svg)](https://hysenlabs.com/projects/cyberjunky-python-garminconnect)

Was this useful?